Skip to content

Commit 8cf281b

Browse files
aduh95Trott
andauthored
doc: deprecate use of invalid ports in url.parse
PR-URL: #45576 Refs: #45526 Co-authored-by: Rich Trott <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent a972144 commit 8cf281b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/api/deprecations.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3295,6 +3295,22 @@ Type: Documentation-only
32953295
have security implications. Use the [WHATWG URL API][] instead. CVEs are not
32963296
issued for `url.parse()` vulnerabilities.
32973297

3298+
### DEP0170: Invalid port when using `url.parse()`
3299+
3300+
<!-- YAML
3301+
changes:
3302+
- version:
3303+
- REPLACEME
3304+
pr-url: https://github.com/nodejs/node/pull/45576
3305+
description: Documentation-only deprecation.
3306+
-->
3307+
3308+
Type: Documentation-only
3309+
3310+
[`url.parse()`][] accepts URLs with ports that are not numbers. This behavior
3311+
might result in host name spoofing with unexpected input. These URLs will throw
3312+
an error in future versions of Node.js, as the [WHATWG URL API][] does already.
3313+
32983314
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
32993315
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
33003316
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4

0 commit comments

Comments
 (0)