Closed Bug 573238 Opened 14 years ago Closed 14 years ago

Windows authentication broken (regression on 20100617 or 20100618)

Categories

(Core :: Networking: HTTP, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla2.0b1
Tracking Status
blocking2.0 --- final+

People

(Reporter: u331436, Assigned: Dolske)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a6pre) Gecko/20100619 Lightning/1.1a1pre SeaMonkey/2.0pre - not Firefox
Build Identifier: Seamonkey nightliy build 20100619 012306 (WinXP SP3)

I'm using a windows authentication (work network) which fails since build 20100617 or 20100618.
When clicking a URL that should go through the authentication, I get an error 401 UNAUTHORIZED, instead of being prompted for domain\username and password

Reproducible: Always

Steps to Reproduce:
1.Try to access a corporate share point or protected web site (internal corporate network)
2.On the first time, prompted for the master password
3.The page is not loading, only 401 UNAUTHORIZED is shown on the browser
4.Trying to access another one, same issue
Actual Results:  
401 UNAUTHORIZED on browser

Expected Results:  
Get to the share point or protected web site

Only the seamonkey nightly is broken. Build 20100617 or 20100618 brought the regression, prior nightlies were working
I tested the web site and share point failing with SM2.1 nightly with a regular firefox (version 3.6.3). All works fine.
Tested with a clean profile, same problem.
Component: Security → Networking: HTTP
QA Contact: toolkit → networking.http
Bah, this could be a regression from bug 563274.

Can you enable debug output (see https://wiki.mozilla.org/Firefox:Password_Manager_Debugging), and compare the output from a working and broken build? That may help track this down quicker.
Preemptively nomming for blocking Beta 1, I don't have a way to try and reproduce offhand, but broken domain auth would be sucky to ship with.
blocking2.0: --- → ?
Here is a full error log (broken build = 20100620)
(I'll post a working one later...)

Pwmgr Prompter: ===== initialized =====
Pwmgr Prompter: ===== asyncPromptAuth called =====
Pwmgr Prompter: Async prompt key = 1|http://teams1.sharepoint.xxxx.com|http://teams1.sharepoint.xxxx.com
Pwmgr Prompter: Adding new prompt to the queue, callback = [xpconnect wrapped nsIAuthPromptCallback]
Pwmgr PrompFactory: _doAsyncPrompt:run dispatched
Pwmgr PrompFactory: _doAsyncPrompt:run - performing the prompt for '1|http://teams1.sharepoint.hp.com|http://teams1.sharepoint.xxxx.com'
Pwmgr Prompter: ===== promptAuth called =====
Login Manager: Searching for logins matching host: http://teams1.sharepoint.xxxx.com, formSubmitURL: null, httpRealm: http://teams1.sharepoint.xxxx.com
PwMgr mozStorage: _searchLogins: returning 1 logins
PwMgr mozStorage: _findLogins: returning 1 logins
Pwmgr Prompter: found 1 matching logins.
Login Manager: Checking if logins to http://teams1.sharepoint.xxxx.com can be saved.
PwMgr mozStorage: Getting login saving is enabled for http://teams1.sharepoint.xxxx.com

Error: realm is null
Source File: file:///C:/Program%20Files/SeaMonkey/components/nsPrompter.js
Line: 320
Error: LoginManagerPrompter: _doAsyncPrompt:run: [Exception... "'[JavaScript Error: "realm is null" {file: "file:///C:/Program%20Files/SeaMonkey/components/nsPrompter.js" line: 320}]' when calling method: [nsIPromptService2::promptAuth]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: file:///C:/Program%20Files/SeaMonkey/components/nsLoginManagerPrompter.js :: anonymous :: line 587"  data: yes]

Source File: file:///C:/Program%20Files/SeaMonkey/components/nsLoginManagerPrompter.js
Line: 124

Pwmgr PrompFactory: Calling back to [xpconnect wrapped nsIAuthPromptCallback] ok=false
Pwmgr PrompFactory: _doAsyncPrompt:run bypassed, no prompts in the queue
Login Manager: onStateChange accepted: req = http://teams1.sharepoint.xxxx.com/teams/OMCnetTrade/default.aspx, flags = 0x30004
Login Manager: domEventListener: got event DOMContentLoaded
Here is a correct authentication (taken with seamonkey build 20100614)

Pwmgr Prompter: ===== initialized =====
Pwmgr Prompter: ===== asyncPromptAuth called =====
Pwmgr Prompter: Async prompt key = 1|http://teams1.sharepoint.hp.com|http://teams1.sharepoint.xxxx.com
Pwmgr Prompter: Adding new prompt to the queue, callback = [xpconnect wrapped (nsISupports, nsIChannel, nsIAuthPromptCallback)]
Pwmgr PrompFactory: _doAsyncPrompt:run dispatched
Pwmgr PrompFactory: _doAsyncPrompt:run - performing the prompt for '1|http://teams1.sharepoint.xxxx.com|http://teams1.sharepoint.xxxx.com'
Pwmgr Prompter: ===== promptAuth called =====
Login Manager: Searching for logins matching host: http://teams1.sharepoint.xxxx.com, formSubmitURL: null, httpRealm: http://teams1.sharepoint.xxxx.com
Login Manager: No alternate nsILoginManagerStorage registered
PwMgr mozStorage: Opening database at C:\Documents and Settings\fillond\Application Data\Mozilla\SeaMonkey\Profiles\zlmcjwp4.default\signons.sqlite
PwMgr mozStorage: Initializing Database
PwMgr mozStorage: Creating new statement for query: SELECT * FROM moz_logins WHERE (hostname = :hostname) AND (formSubmitURL isnull) AND (httpRealm = :httpRealm)
PwMgr mozStorage: _searchLogins: returning 1 logins
PwMgr mozStorage: Reencrypting Base64 logins
PwMgr mozStorage: Creating new statement for query: SELECT * FROM moz_logins WHERE (encType = :encType)
PwMgr mozStorage: _searchLogins: returning 0 logins
PwMgr mozStorage: _findLogins: returning 1 logins
Pwmgr Prompter: found 1 matching logins.
Login Manager: Checking if logins to http://teams1.sharepoint.xxxx.com can be saved.
PwMgr mozStorage: Getting login saving is enabled for http://teams1.sharepoint.xxxx.com
PwMgr mozStorage: Creating new statement for query: SELECT hostname FROM moz_disabledHosts WHERE hostname = :hostname
Pwmgr Prompter: Login unchanged, no further action needed.
Login Manager: Modifying oldLogin: [xpconnect wrapped nsILoginInfo] newLogin: [xpconnect wrapped nsISupports]
PwMgr mozStorage: _searchLogins: returning 1 logins
PwMgr mozStorage: Creating new statement for query: UPDATE moz_logins SET hostname = :hostname, httpRealm = :httpRealm, formSubmitURL = :formSubmitURL, usernameField = :usernameField, passwordField = :passwordField, encryptedUsername = :encryptedUsername, encryptedPassword = :encryptedPassword, guid = :guid, encType = :encType, timeCreated = :timeCreated, timeLastUsed = :timeLastUsed, timePasswordChanged = :timePasswordChanged, timesUsed = :timesUsed WHERE id = :id
Pwmgr PrompFactory: Calling back to [xpconnect wrapped (nsISupports, nsIChannel, nsIAuthPromptCallback)] ok=true
Pwmgr PrompFactory: _doAsyncPrompt:run bypassed, no prompts in the queue
Login Manager: onStateChange accepted: req = http://teams1.sharepoint.xxxx.com/teams/YYYYYYYYYY/default.aspx, flags = 0x30004
Grr. This code is obviously broken:

315         // Suppress "the site says: $realm" when we synthesized a missing realm.
316         if (!authInfo.realm && !isProxy)
317             realm = null;
318 
319         // Trim obnoxiously long realms.
320         if (realm.length > 150) {

I think the fix here should be to just change 317 to be |realm = "";|.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → dolske
Blocks: 563274
Version: unspecified → Trunk
thanks Justin for the proposal.
Not sure if I test wrongly here but this (comment 6) does not work.
I also tried to bump up realm.length > 450 to no effect...
any idea ??
Tried FF3.7a6 (nightly) with the same error:

Error: realm is null
Source File: file:///C:/Program%20Files/SeaMonkey/components/nsPrompter.js
Line: 320
Error: LoginManagerPrompter: _doAsyncPrompt:run: [Exception... "'[JavaScript Error: "realm is null" {file: "file:///C:/Program%20Files/SeaMonkey/components/nsPrompter.js" line: 320}]' when calling method: [nsIPromptService2::promptAuth]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: file:///C:/Program%20Files/SeaMonkey/components/nsLoginManagerPrompter.js :: anonymous :: line 587"  data: yes]

Source File: file:///C:/Program%20Files/SeaMonkey/components/nsLoginManagerPrompter.js
Line: 124
> Source File: file:///C:/Program%20Files/SeaMonkey/components/nsPrompter.js
Dom, I don't think this error comes from ried FF3.7a6
Oooops, my bad (too many cut and paste... :-) ). Here is the "minfield" error:

Error: realm is null
Source File: file:///C:/Program%20Files/Minefield/components/nsPrompter.js
Line: 320
Error: LoginManagerPrompter: _doAsyncPrompt:run: [Exception... "'[JavaScript Error: "realm is null" {file: "file:///C:/Program%20Files/Minefield/components/nsPrompter.js" line: 320}]' when calling method: [nsIPromptService2::promptAuth]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: file:///C:/Program%20Files/Minefield/components/nsLoginManagerPrompter.js :: anonymous :: line 587"  data: yes]

Source File: file:///C:/Program%20Files/Minefield/components/nsLoginManagerPrompter.js
Line: 124
Attached patch Patch v.1Splinter Review
Attachment #452851 - Flags: review?(gavin.sharp)
Attachment #452851 - Flags: review?(gavin.sharp) → review+
Pushed http://hg.mozilla.org/mozilla-central/rev/e11c0cb8fbb2

I'm fairly certain this will fix the problem you saw, but if tomorrow's nightly is still broken please reopen the bug, with a log as above.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a6
Flags: in-testsuite+
blocking2.0: ? → final+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: