Closed Bug 1002534 Opened 11 years ago Closed 6 years ago

Password change disambiguation dialog can show "<>" as a username

Categories

(Toolkit :: Password Manager, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: andy+bugzilla, Assigned: manishkk, Mentored)

Details

(Keywords: good-first-bug, polish, Whiteboard: [passwords:capture-UI] [lang=js])

Attachments

(1 file)

Nightly version: 31.0a1 (2014-04-21) Actual: Upon typing in a new password on yammer.com, I was presented with this dialog: https://www.dropbox.com/s/4rj3uwdlosrvkv8/Screenshot%202014-04-28%2009.15.11.png I'm not sure who the user <> is. I do have a habit of typing in usernames with <script> tags in them to try and test XSS in sites, so I'm wondering thats the cause. Expected: I think that user is normally something like "Andrew <script>alert()</alert>", I would expect that to appear, if thats the cause.
Component: General → Password Manager
Product: Firefox → Toolkit
Interesting, I'm not sure I've seen that dialog before and I'm not sure how to quickly reproduce that case. The code is https://mxr.mozilla.org/mozilla-central/source/toolkit/components/passwordmgr/nsLoginManagerPrompter.js?rev=b12a19b0e500#1099 in case someone else wants to investigate.
Summary: Changing password dialog → Password change disambiguation dialog can show "<>" as a username
Whiteboard: [passwords:capture-UI]

This comes from the prompt service "select" UI implementation: https://searchfox.org/mozilla-central/rev/152993fa346c8fd9296e4cd6622234a664f53341/toolkit/components/prompts/content/selectDialog.js#33-34

At https://dxr.mozilla.org/mozilla-central/rev/b12a19b0e500/toolkit/components/passwordmgr/nsLoginManagerPrompter.js#1115 change

logins.map(function (l) l.username);

to

logins.map(l => l.username || this._getLocalizedString("noUsername"))

Use STR from bug 551948 comment 0 along with the test page in attachment 8546945 [details].

Mentor: MattN+bmo
OS: macOS → All
Priority: -- → P3
Hardware: x86 → All
Whiteboard: [passwords:capture-UI] → [passwords:capture-UI] [lang=js]
Assignee: nobody → 1991manish.kumar
Pushed by mozilla@noorenberghe.ca: https://hg.mozilla.org/integration/autoland/rev/b8d6fa47d095 Password change disambiguation dialog can show <> as a username r=MattN
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
QA Whiteboard: [qa-67b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: