Closed Bug 419417 Opened 16 years ago Closed 16 years ago

Remember password infobar appears everytime with Exchange Server 2003 Web Access

Categories

(Toolkit :: Password Manager, defect, P2)

defect

Tracking

()

VERIFIED FIXED
mozilla1.9beta4

People

(Reporter: prometeo.bugs, Assigned: Dolske)

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9b4pre) Gecko/2008022204 Minefield/3.0b4pre
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9b4pre) Gecko/2008022204 Minefield/3.0b4pre

This is pretty visible and easy to reproduce. At work, I need to access mail on the Exchange Server through the web. As soon as I enter the URL, the password manager opens a popup with my login and password. After I click OK or press enter, my Inbox appears, and so does the infobar asking me if I want to remember the password. Even after clicking after "remember", the whole thing happens again at the next connection.
Tested under Windows, Linux and even SeaMonkey2 linux build.

Reproducible: Always

Steps to Reproduce:
1. Connect to an exchange based web mail server
2. Click ok on the popup containing login and password
3. Watch the infobar to remember the password appear
4. Click on remember
5. Logout of the webmail
6. Reconnect and loop from point 2.
Actual Results:  
The infobar should not appear, or the popup should be removed.


Exchange Server 2003 (version 6.5.7974) Web Access

I'm trying to set the priority to major, since it is a very visible bug with a very common service. I don't think FF3 should be shipped with such a bug, but feel free to lower its priority.
Please enable debugging, reproduce your problem, and attach the output here.

See: http://wiki.mozilla.org/Firefox:Password_Manager_Debugging
Pwmgr Prompter: ===== promptAuth called =====
Login Manager: Searching for logins matching host: http://mail.igeam.it, formSubmitURL: null, httpRealm: http://mail.igeam.it
Login Manager: Checking if logins to http://mail.igeam.it can be saved.
Pwmgr Prompter: New login seen for \magninig @ http://mail.igeam.it (http://mail.igeam.it)
Pwmgr Prompter: Adding new save-password notification bar
Login Manager: onStateChange accepted: req = http://mail.igeam.it/exchange/, flags = 196612
Login Manager: onStateChange: adding dom listeners
Login Manager: domEventListener: got event DOMContentLoaded
Login Manager: onStateChange accepted: req = http://mail.igeam.it/exchange/G.Magnini/Posta%20in%20arrivo/?Cmd=contents, flags = 196612
Login Manager: onStateChange: adding dom listeners
Login Manager: domEventListener: got event DOMContentLoaded
Login Manager: Counting logins matching host: http://mail.igeam.it, formSubmitURL: , httpRealm: null
Login Manager: onStateChange accepted: req = http://mail.igeam.it/exchange/G.Magnini/?Cmd=navbar, flags = 196612
Login Manager: onStateChange: adding dom listeners
Login Manager: domEventListener: got event DOMContentLoaded
Login Manager: onStateChange accepted: req = about:blank, flags = 196612
Login Manager: onStateChange: adding dom listeners
Login Manager: domEventListener: got event DOMContentLoaded
Login Manager: Searching for logins matching host: http://mail.igeam.it, formSubmitURL: null, httpRealm: http://mail.igeam.it
Errore: [Exception... "'This login already exists.' when calling method: [nsILoginManager::addLogin]"  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: "JS frame :: file:///C:/Programmi/Mozilla%20Firefox%203%20Beta%203/components/nsLoginManagerPrompter.js :: anonymous :: line 359"  data: no]
File sorgente: file:///C:/Programmi/Mozilla%20Firefox%203%20Beta%203/components/nsLoginManagerPrompter.js
Riga: 359
Errore: uncaught exception: [Exception... "'This login already exists.' when calling method: [nsILoginManager::addLogin]"  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: "JS frame :: file:///C:/Programmi/Mozilla%20Firefox%203%20Beta%203/components/nsLoginManagerPrompter.js :: anonymous :: line 359"  data: no]

(I guess these were added when I clicked on Remember)
Discussion from IRC shows that there were two existing logins, differing in username... One was "\username", the other "username". So, this is almost certainly a dupe of bug 419081. The symptom, at least.

But a little more investigation shows that there's another problem which resulted in the creation of the 2nd login.

In Firefox 2:

Log in first time, enter "username"
Check stored login, has "username"
Log in again, prompt is prefilled with "username"

In Firefox 3:
Log in first time, enter "username"
Check stored login, has "\username" [Note leading backslash]
Log in again, prompt is prefilled with "username"

The fix for bug 409146 made saving Windows domain logins in FF3 work again, but when the domain is empty strangeness happens because of the confusing way we have to the username and domain around, mapping into and then back out from |aAuthInfo| in promptAuth(). What ends up happening is that _GetAuthInfo() returns "\username", when the stored login we fed it was just "username"... We see the username as having changed, and so we try to store it as a new login.

The fix would be to only have _GetAuthInfo() prepend "domain\" when domain is not an empty string. This also jives with what PromptPasswordAdapter() is doing over in embedding/components/windowwatcher/src/nsPrompt.cpp

Giacomo, thanks a lot for helping to verify this problem!
Assignee: nobody → dolske
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: major → normal
Flags: blocking-firefox3?
Target Milestone: --- → Firefox 3 beta4
Version: unspecified → Trunk
Attached patch Patch v.1Splinter Review
Attachment #305700 - Flags: review?(gavin.sharp)
Glad to have helped. And the fix turned out to be a nice oneliner! :-P
I hope it will make it into the final FF3 version.
Flags: blocking-firefox3? → blocking-firefox3+
Priority: -- → P2
Attachment #305700 - Flags: review?(gavin.sharp) → review+
Checking in toolkit/components/passwordmgr/src/nsLoginManagerPrompter.js;
  new revision: 1.26; previous revision: 1.25
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Giacomo: It would be great if you could verify this bug in the latest nightly since we don't have an exchange server to test.  Thanks.
Marking verified after testing with Win version 2008022806.
For Justin: I can confirm that now the stored login is "username" without the trailing backslash. Thanks for fixing this!
Status: RESOLVED → VERIFIED
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: