Failures in xhr/send-authentication-competing-names-passwords.htm

RESOLVED FIXED in Firefox 65

Status

()

enhancement
P3
normal
RESOLVED FIXED
9 months ago
7 months ago

People

(Reporter: twisniewski, Assigned: valentin)

Tracking

(Blocks 1 bug)

Trunk
mozilla65
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox64 wontfix, firefox65 fixed)

Details

(Whiteboard: [necko-triaged])

Attachments

(2 attachments)

NS_NewURI does not consider a URL with an empty username (just a password) to be valid. For instance: http://:pass@host.com

This causes us to fail two of the WPTs in xhr/send-authentication-competing-names-passwords.htm.

Blink and WebKit pass these tests, while Edge doesn't seem to support username *or* password in URLs passed to xhr.open. Per the WhatWG URL and XHR specs, we seem to be doing the wrong thing here.

anne, smaug, what do you think? It seems like we would probably need to address this in NS_NewURI, not the XHR code. Should we?
Flags: needinfo?(bugs)
Flags: needinfo?(annevk)

Comment 1

9 months ago
Yeah, this should be fixed in the URL parser. No bug blocking bug 906714 is about this as far as I can tell. Valentin, do you know of any, do you want to reuse this bug, or should a new bug be filed?
Flags: needinfo?(valentin.gosu)
Flags: needinfo?(bugs)
Flags: needinfo?(annevk)
There might be one, but I can't find it right now. I'll just use this one for the fix.
Assignee: nobody → valentin.gosu
Component: DOM → Networking
Flags: needinfo?(valentin.gosu)
Priority: -- → P3
Whiteboard: [necko-triaged]

Comment 8

7 months ago
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/9ad299b5161b
Allow empty username in URLs r=dragana
Attachment #9023466 - Attachment description: Bug 1495313 - Allow empty username in URLs r?dragana! → Bug 1495313 - Allow password with empty username in URLs r?dragana!
(In reply to Andreea Pavel [:apavel] from comment #9)
> Backed out for failing mochitest at
> dom/security/test/cors/test_CrossSiteXHR.html 

It seems I used lando to push the stack, but I pushed only the first commit :)
Assignee

Updated

7 months ago
Flags: needinfo?(valentin.gosu)

Comment 11

7 months ago
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ef6d81f0b298
Allow password with empty username in URLs r=dragana
https://hg.mozilla.org/integration/autoland/rev/db95e3b861f4
Fix xhr/fetch tests to allow passwords with no username in URLs r=baku

Comment 12

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/ef6d81f0b298
https://hg.mozilla.org/mozilla-central/rev/db95e3b861f4
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.