mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-24 08:22:41 +00:00
Auth: fix leak of username
When collect_credentials() returns a failure status, 'username' was potentially leaked.
This commit is contained in:
parent
ad8966ccf9
commit
b7c8049460
@ -744,17 +744,16 @@ authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
|
||||
"oVirt",
|
||||
NULL,
|
||||
&username, &password);
|
||||
if (ret < 0) {
|
||||
return FALSE;
|
||||
} else {
|
||||
if (ret == 0) {
|
||||
g_object_set(G_OBJECT(proxy),
|
||||
"username", username,
|
||||
"password", password,
|
||||
NULL);
|
||||
g_free(username);
|
||||
g_free(password);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_free(username);
|
||||
g_free(password);
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user