Closed Bug 359824 Opened 18 years ago Closed 18 years ago

necko unit test failure: test_authentication.js

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: davel, Assigned: Waldo)

References

()

Details

(Keywords: regression, Whiteboard: [blocking1.9a1+])

Attachments

(1 file, 1 obsolete file)

test has been failing since 2006-11-06 08:50
*** Bug 359981 has been marked as a duplicate of this bug. ***
The "problem" is in nsMIMEHeaderParamImpl::GetParameterInternal. We pass "Basic realm="secret"" in as the header value, and it expects things to be in the form of "<token>=<token or quoted string>". It worked before because we were just calling strstr() on the challenge string and that got us where we needed to be to parse the value. So the fix is probably to tidy up the challenge string before it's passed into GetParameter, I guess.
Attachment #245056 - Flags: review?(cbiesinger)
Comment on attachment 245056 [details] [diff] [review] Be sure to pass GetParameter the right thing v1.0 hm, come to think of it, I'm not sure that you can use nsIMIMEHeaderParam for this header... it separates the parameters with a comma rather than a semicolon
Comment on attachment 245056 [details] [diff] [review] Be sure to pass GetParameter the right thing v1.0 I'm just attempting to fix bustage. If using nsIMIMEHeaderParam isn't going to work, I think we need to back out the patch for bug 223846.
Attachment #245056 - Flags: review?(cbiesinger)
Even ignoring the issue of where the string passed to ParseRealm begins, the patch for bug 223846 was wrong, and it won't handle cases where realm is just one of several key-value pairs in a comma-separated list (particularly if realm isn't the first item in the list), which per RFC 2617 is how the syntax of WWW-Authenticate is structured: challenge = auth-scheme 1*SP 1#auth-param It should be possible to fix this by adding another method to nsIMIMEHeaderParam to parse comma-separated key-value pair lists, probably by converting the code in GetParameterInternal to a new private method which takes either ';' or ',' as one of its arguments and which GetParameterInternal and the new method would call, but I'd rather not spend that much time on this at the moment. Someone else who cares more can make that fix, which should be slightly tedious but not particularly difficult.
Assignee: nobody → jwalden+bmo
Attachment #245056 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #246259 - Flags: superreview?(darin.moz)
Attachment #246259 - Flags: review?(cbiesinger)
I think we want to back this out for 1.9a1, as this prevents people from logging into sites like http://intranet.mozilla.org, see bug #361544 I backed out bug #223846 (thanks waldo for the patch) and now I can log in.
I think we should take waldo's back out for 1.9a1
Blocks: 361544
Flags: blocking1.9?
Yes, please back out ASAP -- shouldn't need reviews for the backout (or can r=me for it)
Flags: blocking1.9? → blocking1.9+
Whiteboard: [blocking1.9a1+]
Comment on attachment 246259 [details] [diff] [review] Back out bug 223846 r=vlad,sspitzer with a verbal "good idea" from g#. I've backed out the other fix.
Attachment #246259 - Flags: superreview?(darin.moz)
Attachment #246259 - Flags: review?(cbiesinger)
Attachment #246259 - Flags: review+
fixed.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
For the record, the backout omitted the removal of the nsIMIMEHeaderParam.h #include added in bug 223846 (and included in the backout patch posted here); I just removed the #include on trunk.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: