Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backup key and filter field being autofilled as logins #1200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ichthyosaurus
Copy link

Firefox misinterprets the backup key field on the settings page and the room filter field as a pair of username-password login fields. It then autofills a username in the filter field each time the settings page is opened.

The only working fix is to mark both fields as "autocomplete: new-password" because Firefox ignores all other directives. I still added the proper attributes to both fields just in case the major browsers will decide to follow the spec one day.

The "readonly" hack is included for completeness. It may improve compatibility with older browsers where one of the other tricks fails.

The same fix is intended in #616 but I think my code is more semantically correct in this case. What's even more important, #616 doesn't fix the issue on my end using Firefox 132 and older.

Bug

Fixes #380.
Fixes hydrogen-sailfishos/harbour-hydrogen#41.

Firefox misinterprets the backup key field on the settings page
and the room filter field as a pair of username-password login
fields. It then autofills a username in the filter field each
time the settings page is opened.

The only working fix is to mark both fields as "autocomplete: new-password"
because Firefox ignores all other directives. I still added the proper
attributes to both fields just in case the major browsers will decide
to follow the spec one day.

The "readonly" hack is included for completeness. It may improve
compatibility with older browsers where one of the other tricks fails.

Signed-off-by: Mirian Margiani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filtered room is filled with my username when I go back from the page Settings Chrome Autofills Security Key
1 participant