DEP0170:使用 url.parse() 时端口无效


¥DEP0170: Invalid port when using url.parse()

类型:生命结束

¥Type: End-of-Life

url.parse() 用于接受端口号非数字的 URL。此行为可能会导致使用意外输入进行主机名欺骗。这些 URL 会抛出错误(WHATWG URL API 也会抛出错误)。

¥url.parse() used to accept URLs with ports that are not numbers. This behavior might result in host name spoofing with unexpected input. These URLs will throw an error (which the WHATWG URL API also does).