Skip to content

url: handle quasi-WHATWG URLs in urlToOptions()

Rodrigo Muino Tomonari requested to merge github/fork/cjihrig/url into master

This commit prevents the internal urlToOptions() from throwing when a malformed WHATWG URL is encountered. This is more of a bandaid fix, as the return value will still be pretty useless, but garbage in, garbage out I guess.

I don't think we want to slow this specific function down with a lot of extra validation code, but maybe others feel differently.

Refs: https://github.com/nodejs/node/issues/26198

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading