Closed Bug 1873944 Opened 2 years ago Closed 2 years ago

Properly parse data and about URLs that have a hostname

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: valentin, Assigned: dotoole)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

data and about URLs are parsed with nsSimpleURI currently.
that means everything after the first : is part of the path. But these schemes are not special (in the URL spec sense), so they could potentially have a host.

This bug tracks handling these corner cases in WPT, even though they would normally not affect developers.

What we could do is if the URL starts with data:/ or about:/ then we first parse it with DefaultURI and then use the result to construct a nsSimpleURI. 🤷‍♂️

Assignee: nobody → dotoole
Attachment #9392013 - Attachment description: WIP: Bug 1873944 - Also parse about urls with DefaultURI if starting with 'about:/'. r=valentin → WIP: Bug 1873944 - Also parse about and data urls with DefaultURI if starting with '/'. r=valentin
Attachment #9392013 - Attachment description: WIP: Bug 1873944 - Also parse about and data urls with DefaultURI if starting with '/'. r=valentin → Bug 1873944 - Also parse about and data urls with DefaultURI if starting with '/'. r=valentin
Pushed by dotoole@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c6777d2ebff8 Also parse about and data urls with DefaultURI if starting with '/'. r=necko-reviewers,valentin,rpl
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch

Per discussion with Valentin, I think we want to back this out if that is still possible, given some regressions.

Flags: needinfo?(valentin.gosu)
See Also: → 1997895

I filed bug 1997895 to be able to track affected builds more easily.

Flags: needinfo?(valentin.gosu)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: