A
A
Alexander Tsymbal2020-02-28 12:54:50
Google Chrome
Alexander Tsymbal, 2020-02-28 12:54:50

How to force Chrome to use correct login when updating password?

Hi friends!

I encountered a situation where the Chrome browser incorrectly updates the information when changing the password on the page.
For example, a username/password pair for a particular site is stored in the browser. We authorize on this site, then in the password change section (normal section, 2 fields <input type='password'>for input and verification) we enter a new password and when we click "Save", we see a standard browser notification:
f013fa6f78.jpg
I would like the password to be updated for the authorized user. And the form for updating the password of the current authorization popped up.
7b174ea31c.jpg

PS :( Trying to add hidden field with login

<input type='hidden' name='login' value='[текущий_логин]'>
was not crowned with success.

I beg you to help! Maybe some additional fields need to be added to the form? Or is there some kind of browser API for this purpose?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Tsymbal, 2020-02-28
@AlexanderTsymbal

Answer found. There must be a visible field (not type='hidden') with the entered login. It can be prohibited from editing using the readonly attribute, as well as "hidden" using css.
HTML:

<input type="text" name="login" value="[ТЕКУЩИЙ_ЛОГИН]" class="no_need_to_show" readonly>

CSS:
.no_need_to_show {
    position: fixed;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    border: 0;
    opacity: 0.01;
    pointer-events: none;
    /* еще можно отрицательный z-index, прозрачный background и т.д. */
}

#
#, 2020-02-28
@mindtester

1 - check the url, if there is at least one character difference, the browser behavior is quite logical
2 - if you are absolutely sure that you have found a bug, you can go here https://www.chromium.org/for-testers/bug-reporting...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question