Closed Bug 1849332 Opened 1 year ago Closed 1 year ago

Fix remaining https-scheme failures in url/url-setters-stripping tests

Categories

(Core :: DOM: Networking, defect, P2)

defect

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Bug 1818374 resolved most of the failures here, but there are a couple of remaining ones, as found in the url-setters-stripping.any.js.ini metadata file:

  [Setting port with leading U+0000 (https:)]
  [Setting port with leading U+001F (https:)]

It seems these are failing because URL::SetPort uses nsAString::ToInteger() to parse the port number, but this method skips over initial non-numeric (actually non-hexadecimal) characters in the string.

However, to be valid as a a value for the port setter, the string would need to begin with an ASCII digit, afaict:

https://url.spec.whatwg.org/#dom-url-port
https://url.spec.whatwg.org/#port-state

So we should check that before passing the string to ToInteger.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/00adce290a8f Ensure URL::SetPort rejects values with leading non-numeric junk. r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: