diff options
-rw-r--r-- | embed/ephy-embed-shell.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c index 45cc66600..d7d2bbf03 100644 --- a/embed/ephy-embed-shell.c +++ b/embed/ephy-embed-shell.c @@ -425,6 +425,13 @@ web_process_extension_password_manager_query_received_cb (WebKitUserContentManag if (!origin || !target_origin || !password_field) return; + /* Don't include username_field in queries unless we actually have a username + * to go along with it, or the query will fail because we don't save + * username_field without a corresponding username. + */ + if (!username && username_field) + g_clear_pointer (&username_field, g_free); + PasswordManagerData *data = g_new (PasswordManagerData, 1); data->shell = g_object_ref (shell); data->promise_id = promise_id; |