The port value will be checked when setting url.port. All the values that overflows the 16-bit numeric limit will be no longer valid. For instance the following script behave differently after the change: ``` u = new URL("http://test.com"); u.port = 65536; console.log(u.port); ``` Before the change the output is 65536. After the change the output will be 80.
No signals
No milestones specified
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
The implementation can be found at https://chromium-review.googlesource.com/c/chromium/src/+/4252309On Wed, Feb 22, 2023 at 9:39 PM Jiacheng Guo <g...@google.com> wrote:
https://url.spec.whatwg.org/#dom-url-port
SpecificationSummary
The port value will be checked when setting url.port. All the values that overflows the 16-bit numeric limit will be no longer valid. For instance the following script behave differently after the change: ``` u = new URL("http://test.com"); u.port = 65536; console.log(u.port); ``` Before the change the output is 65536. After the change the output will be 80.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJQw1NyQV7zuDODbvobJK%2BK_WeSX%2B-Bq5S80RAQqQZmy2NZxqw%40mail.gmail.com.
We don't currently have a use counter for it.Does it make sense to add the port overflow check under a flag and a usecounter as well to record the frequency of setting URL ports with an overflow value.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfXNj3LDqQ0H%3DUE_p3zML%3DTRksMzb%3Dtc25EmtkaaCPNa3w%40mail.gmail.com.
LGTM2
/Daniel
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfUcjZ_9nLbvUX4Dg12d6RYaWd05FjsqokKtBZfe%3DJohsw%40mail.gmail.com.