Skip to content

Commit b6b5b51

Browse files
aduh95Trott
authored andcommitted
doc: deprecate use of invalid ports in url.parse
PR-URL: #45576 Refs: #45526 Co-authored-by: Rich Trott <rtrott@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent f63ae52 commit b6b5b51

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/api/deprecations.md

+16
Original file line numberDiff line numberDiff line change
@@ -3292,6 +3292,22 @@ Type: Documentation-only
32923292
have security implications. Use the [WHATWG URL API][] instead. CVEs are not
32933293
issued for `url.parse()` vulnerabilities.
32943294

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

0 commit comments

Comments
 (0)