New issue
Advanced search Search tips

Issue 634906 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

If the username is readonly, Chrome offers to fill passwords but fails to do it

Project Member Reported by vabr@chromium.org, Aug 5 2016

Issue description

Version: Any recent version, tested with 54
OS: Anything but iOS (did not check there, but the code is different)

What steps will reproduce the problem?
(1) Stage the attached readonly.html on a webserver, navigate to it.
(2) Fill the first form with a non-empty username, submit, save the password.
(3) Navigate back to readonly.html, click on the second password field, accept the offer to fill it with the saved password.

What is the expected output?
The password value is filled.

What do you see instead?
Nothing is filled.

Notes:

* The issue is with the second form having a readonly username. That results in PasswordAutofillAgent::FillSuggestion failing the check IsElementAutocompletable(username_element).

* The above is a toy example, a real-world example is, e.g., accounts.google.com:
  (1') Use a profile where the user is not signed in to Chrome.
  (2') Log in on accounts.google.com with a gmail.com address, but leave out the @gmail.com part. Save the password.
  (3') Sign out and go back to accounts.google.com.
  After step (3') there will be a readonly field with the canonical form of the Google username, including the @gmail.com part. But the password field will not be autofilled (because the saved username does not match the canonical one), and the manual filling won't work either (because the username is readonly).

* The intention of the "use password for" pop-up in the password field is to override bad guessing on Chrome's side. On the example of accounts.google.com, one can see that Chrome will autofill if the stored username is matching its canonical form, i.e., if it is the same as the readonly value. But even then it won't fill on demand, which is clearly inconsistent.

We should drop the requirement for the username to be autocompletable in the case when the user triggered manual filling from the password field.
 
readonly.html
718 bytes View Download

Comment 1 by vabr@chromium.org, Sep 7 2016

Status: Started (was: Available)
A contributor is working on this in https://codereview.chromium.org/2317983002/
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e2f4816a8b85b4078c7daabe73411f36cddd702e

commit e2f4816a8b85b4078c7daabe73411f36cddd702e
Author: sense <sense@yandex-team.ru>
Date: Thu Sep 08 12:26:05 2016

Enable manual password autofilling if the username field is read-only.

If the username field was read-only, password manager allowed to choose saved
password but failed to insert it into the password field.

BUG= 634906 
R=vabr@chromium.org

Review-Url: https://codereview.chromium.org/2317983002
Cr-Commit-Position: refs/heads/master@{#417264}

[modify] https://crrev.com/e2f4816a8b85b4078c7daabe73411f36cddd702e/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
[modify] https://crrev.com/e2f4816a8b85b4078c7daabe73411f36cddd702e/components/autofill/content/renderer/password_autofill_agent.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 8 2016

Labels: merge-merged-2854
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e2f4816a8b85b4078c7daabe73411f36cddd702e

commit e2f4816a8b85b4078c7daabe73411f36cddd702e
Author: sense <sense@yandex-team.ru>
Date: Thu Sep 08 12:26:05 2016

Enable manual password autofilling if the username field is read-only.

If the username field was read-only, password manager allowed to choose saved
password but failed to insert it into the password field.

BUG= 634906 
R=vabr@chromium.org

Review-Url: https://codereview.chromium.org/2317983002
Cr-Commit-Position: refs/heads/master@{#417264}

[modify] https://crrev.com/e2f4816a8b85b4078c7daabe73411f36cddd702e/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
[modify] https://crrev.com/e2f4816a8b85b4078c7daabe73411f36cddd702e/components/autofill/content/renderer/password_autofill_agent.cc

Comment 4 by vabr@chromium.org, Sep 9 2016

Status: Fixed (was: Started)
Thanks, sense@yandex-team.ru, for fixing this!

Sign in to add a comment