Closed Bug 1856140 Opened 1 year ago Closed 1 year ago

Discrepancies in %-escaping of username/password in URL

Categories

(Core :: Networking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

I noticed that we have some URL test failures that occur because the set of characters that are percent-escaped in the username/password fields of the URL don't match WPT expectations.

Checking the URL spec it seems that both username and password should depend on "the userinfo percent-encode set", so would share the same escaping behavior. However, in nsEscape.cpp they end up with slightly different encode sets, and don't match what the URL standard specifies. In particular,

  • vertical bar | should be encoded
  • period . and apostrophe ' should not be encoded

Adjusting these encode-sets to align with the spec will result in several new WPT passes, so unless there's some legacy-compat reason we can't do so, I suggest we should make this change.

Depends on: 1750945
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Severity: -- → S3
Priority: -- → P2
Whiteboard: [neck
Whiteboard: [neck → [necko-triaged]
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6a54caa9b328 Update set of url-escaped chars used for username/password to match WPT test expectations. r=necko-reviewers,jesup
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: