Uh oh!
There was an error while loading. Please reload this page.
url: handle quasi-WHATWG URLs in urlToOptions() - #26226
Conversation
lpinca
left a comment
There was a problem hiding this comment.
It still throws if url.pathname is a Symbol for example, but that is very unlikely I guess.
BridgeAR
left a comment
There was a problem hiding this comment.
Should we add a test for this as well?
cjihrig
commented
Feb 21, 2019
Test added.
Yea, the point was to handle the case where a copied URL object passes our brand checking (the existence of several symbols). It seems unlikely that |
03dcf8a to
1b6ebffComparePR-URL: nodejs#26226 Refs: nodejs#26198 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
cjihrig
commented
Feb 26, 2019
szmarczak
commented
Feb 15, 2020
Will this be merged into Node.js 10? |
Notable changes:
- buffer: add {read|write}Big\[U\]Int64{BE|LE} methods (garygsc)
[#19691](#19691)
- deps:
- update npm to 6.14.3 (Myles Borins)
[#32368](#32368)
- upgrade openssl sources to 1.1.1e (Hassaan Pasha)
[#32328](#32328)
- upgrade to libuv 1.34.2 (cjihrig)
[#31477](#31477)
- n-api:
- add napi\_get\_all\_property\_names (himself65)
[#30006](#30006)
- add APIs for per-instance state management (Gabriel Schulhof)
[#28682](#28682)
- turn NAPI\_CALL\_INTO\_MODULE into a function (Anna Henningsen)
[#26128](#26128)
- tls:
- expose keylog event on TLSSocket (Alba Mendez)
[#27654](#27654)
- support TLS min/max protocol defaults in CLI (Sam Roberts)
[#27946](#27946)
- url: handle quasi-WHATWG URLs in urlToOptions() (cjihrig)
[#26226](#26226)
PR-URL: #31984Notable changes:
- buffer: add {read|write}Big\[U\]Int64{BE|LE} methods (garygsc)
[#19691](#19691)
- deps:
- update npm to 6.14.3 (Myles Borins)
[#32368](#32368)
- upgrade openssl sources to 1.1.1e (Hassaan Pasha)
[#32328](#32328)
- upgrade to libuv 1.34.2 (cjihrig)
[#31477](#31477)
- n-api:
- add napi\_get\_all\_property\_names (himself65)
[#30006](#30006)
- add APIs for per-instance state management (Gabriel Schulhof)
[#28682](#28682)
- turn NAPI\_CALL\_INTO\_MODULE into a function (Anna Henningsen)
[#26128](#26128)
- tls:
- expose keylog event on TLSSocket (Alba Mendez)
[#27654](#27654)
- support TLS min/max protocol defaults in CLI (Sam Roberts)
[#27946](#27946)
- url: handle quasi-WHATWG URLs in urlToOptions() (cjihrig)
[#26226](#26226)
PR-URL: #31984Notable changes:
- buffer: add {read|write}Big\[U\]Int64{BE|LE} methods (garygsc)
[#19691](#19691)
- deps:
- update npm to 6.14.3 (Myles Borins)
[#32368](#32368)
- upgrade openssl sources to 1.1.1e (Hassaan Pasha)
[#32328](#32328)
- upgrade to libuv 1.34.2 (cjihrig)
[#31477](#31477)
- n-api:
- add napi\_get\_all\_property\_names (himself65)
[#30006](#30006)
- add APIs for per-instance state management (Gabriel Schulhof)
[#28682](#28682)
- turn NAPI\_CALL\_INTO\_MODULE into a function (Anna Henningsen)
[#26128](#26128)
- tls:
- expose keylog event on TLSSocket (Alba Mendez)
[#27654](#27654)
- support TLS min/max protocol defaults in CLI (Sam Roberts)
[#27946](#27946)
- url: handle quasi-WHATWG URLs in urlToOptions() (cjihrig)
[#26226](#26226)
PR-URL: #31984Notable changes:
- buffer: add {read|write}Big\[U\]Int64{BE|LE} methods (garygsc)
[#19691](#19691)
- build: macOS package notarization (Rod Vagg)
[#31459](#31459)
- deps:
- update npm to 6.14.3 (Myles Borins)
[#32368](#32368)
- upgrade openssl sources to 1.1.1e (Hassaan Pasha)
[#32328](#32328)
- upgrade to libuv 1.34.2 (cjihrig)
[#31477](#31477)
- n-api:
- add napi\_get\_all\_property\_names (himself65)
[#30006](#30006)
- add APIs for per-instance state management (Gabriel Schulhof)
[#28682](#28682)
- turn NAPI\_CALL\_INTO\_MODULE into a function (Anna Henningsen)
[#26128](#26128)
- tls:
- expose keylog event on TLSSocket (Alba Mendez)
[#27654](#27654)
- support TLS min/max protocol defaults in CLI (Sam Roberts)
[#27946](#27946)
- url: handle quasi-WHATWG URLs in urlToOptions() (cjihrig)
[#26226](#26226)
PR-URL: #31984Notable changes:
- buffer: add {read|write}Big\[U\]Int64{BE|LE} methods (garygsc)
[#19691](#19691)
- build: macOS package notarization (Rod Vagg)
[#31459](#31459)
- deps:
- update npm to 6.14.3 (Myles Borins)
[#32368](#32368)
- upgrade openssl sources to 1.1.1e (Hassaan Pasha)
[#32328](#32328)
- upgrade to libuv 1.34.2 (cjihrig)
[#31477](#31477)
- n-api:
- add napi\_get\_all\_property\_names (himself65)
[#30006](#30006)
- add APIs for per-instance state management (Gabriel Schulhof)
[#28682](#28682)
- define release 6
[#32058](#32058)
- turn NAPI\_CALL\_INTO\_MODULE into a function (Anna Henningsen)
[#26128](#26128)
- tls:
- expose keylog event on TLSSocket (Alba Mendez)
[#27654](#27654)
- support TLS min/max protocol defaults in CLI (Sam Roberts)
[#27946](#27946)
- url: handle quasi-WHATWG URLs in urlToOptions() (cjihrig)
[#26226](#26226)
PR-URL: #31984macOS package notarization and a change in builder configuration
The macOS binaries for this release, and future 10.x releases, are now
being compiled on macOS 10.15 (Catalina) with Xcode 11 to support
package notarization, a requirement for installing .pkg files on macOS
10.15 and later. Previous builds of Node.js 10.x were compiled on macOS
10.7 (Lion). As binaries are still being compiled to support a minimum
of macOS 10.7 (Lion) we do not anticipate this having a negative impact
on Node.js 10.x users with older versions of macOS.
Notable changes:
- buffer: add {read|write}Big\[U\]Int64{BE|LE} methods (garygsc)
[#19691](#19691)
- build: macOS package notarization (Rod Vagg)
[#31459](#31459)
- deps:
- update npm to 6.14.3 (Myles Borins)
[#32368](#32368)
- upgrade openssl sources to 1.1.1e (Hassaan Pasha)
[#32328](#32328)
- upgrade to libuv 1.34.2 (cjihrig)
[#31477](#31477)
- n-api:
- add napi\_get\_all\_property\_names (himself65)
[#30006](#30006)
- add APIs for per-instance state management (Gabriel Schulhof)
[#28682](#28682)
- define release 6
[#32058](#32058)
- turn NAPI\_CALL\_INTO\_MODULE into a function (Anna Henningsen)
[#26128](#26128)
- tls:
- expose keylog event on TLSSocket (Alba Mendez)
[#27654](#27654)
- support TLS min/max protocol defaults in CLI (Sam Roberts)
[#27946](#27946)
- url: handle quasi-WHATWG URLs in urlToOptions() (cjihrig)
[#26226](#26226)
PR-URL: #31984macOS package notarization and a change in builder configuration
The macOS binaries for this release, and future 10.x releases, are now
being compiled on macOS 10.15 (Catalina) with Xcode 11 to support
package notarization, a requirement for installing .pkg files on macOS
10.15 and later. Previous builds of Node.js 10.x were compiled on macOS
10.10 (Yosemite) with a minimum deployment target of macOS 10.7 (Lion).
As binaries are still being compiled to support a minimum of macOS 10.7
(Lion) we do not anticipate this having a negative impact on Node.js
10.x users with older versions of macOS.
Notable changes:
- buffer: add {read|write}Big\[U\]Int64{BE|LE} methods (garygsc)
[#19691](#19691)
- build: macOS package notarization (Rod Vagg)
[#31459](#31459)
- deps:
- update npm to 6.14.3 (Myles Borins)
[#32368](#32368)
- upgrade openssl sources to 1.1.1e (Hassaan Pasha)
[#32328](#32328)
- upgrade to libuv 1.34.2 (cjihrig)
[#31477](#31477)
- n-api:
- add napi\_get\_all\_property\_names (himself65)
[#30006](#30006)
- add APIs for per-instance state management (Gabriel Schulhof)
[#28682](#28682)
- define release 6
[#32058](#32058)
- turn NAPI\_CALL\_INTO\_MODULE into a function (Anna Henningsen)
[#26128](#26128)
- tls:
- expose keylog event on TLSSocket (Alba Mendez)
[#27654](#27654)
- support TLS min/max protocol defaults in CLI (Sam Roberts)
[#27946](#27946)
- url: handle quasi-WHATWG URLs in urlToOptions() (cjihrig)
[#26226](#26226)
PR-URL: #31984macOS package notarization and a change in builder configuration
The macOS binaries for this release, and future 10.x releases, are now
being compiled on macOS 10.15 (Catalina) with Xcode 11 to support
package notarization, a requirement for installing .pkg files on macOS
10.15 and later. Previous builds of Node.js 10.x were compiled on macOS
10.10 (Yosemite) with a minimum deployment target of macOS 10.7 (Lion).
As binaries are still being compiled to support a minimum of macOS 10.7
(Lion) we do not anticipate this having a negative impact on Node.js
10.x users with older versions of macOS.
Notable changes:
- buffer: add {read|write}Big\[U\]Int64{BE|LE} methods (garygsc)
[#19691](#19691)
- build: macOS package notarization (Rod Vagg)
[#31459](#31459)
- deps:
- update npm to 6.14.3 (Myles Borins)
[#32368](#32368)
- upgrade openssl sources to 1.1.1e (Hassaan Pasha)
[#32328](#32328)
- upgrade to libuv 1.34.2 (cjihrig)
[#31477](#31477)
- n-api:
- add napi\_get\_all\_property\_names (himself65)
[#30006](#30006)
- add APIs for per-instance state management (Gabriel Schulhof)
[#28682](#28682)
- define release 6
[#32058](#32058)
- turn NAPI\_CALL\_INTO\_MODULE into a function (Anna Henningsen)
[#26128](#26128)
- tls:
- expose keylog event on TLSSocket (Alba Mendez)
[#27654](#27654)
- support TLS min/max protocol defaults in CLI (Sam Roberts)
[#27946](#27946)
- url: handle quasi-WHATWG URLs in urlToOptions() (cjihrig)
[#26226](#26226)
PR-URL: #31984macOS package notarization and a change in builder configuration
The macOS binaries for this release, and future 10.x releases, are now
being compiled on macOS 10.15 (Catalina) with Xcode 11 to support
package notarization, a requirement for installing .pkg files on macOS
10.15 and later. Previous builds of Node.js 10.x were compiled on macOS
10.10 (Yosemite) with a minimum deployment target of macOS 10.7 (Lion).
As binaries are still being compiled to support a minimum of macOS 10.7
(Lion) we do not anticipate this having a negative impact on Node.js
10.x users with older versions of macOS.
Notable changes:
- buffer: add {read|write}Big\[U\]Int64{BE|LE} methods (garygsc)
[#19691](#19691)
- build: macOS package notarization (Rod Vagg)
[#31459](#31459)
- deps:
- update npm to 6.14.3 (Myles Borins)
[#32368](#32368)
- upgrade openssl sources to 1.1.1e (Hassaan Pasha)
[#32328](#32328)
- upgrade to libuv 1.34.2 (cjihrig)
[#31477](#31477)
- n-api:
- add napi\_get\_all\_property\_names (himself65)
[#30006](#30006)
- add APIs for per-instance state management (Gabriel Schulhof)
[#28682](#28682)
- define release 6
[#32058](#32058)
- turn NAPI\_CALL\_INTO\_MODULE into a function (Anna Henningsen)
[#26128](#26128)
- tls:
- expose keylog event on TLSSocket (Alba Mendez)
[#27654](#27654)
- support TLS min/max protocol defaults in CLI (Sam Roberts)
[#27946](#27946)
- url: handle quasi-WHATWG URLs in urlToOptions() (cjihrig)
[#26226](#26226)
PR-URL: #31984macOS package notarization and a change in builder configuration
The macOS binaries for this release, and future 10.x releases, are now
being compiled on macOS 10.15 (Catalina) with Xcode 11 to support
package notarization, a requirement for installing .pkg files on macOS
10.15 and later. Previous builds of Node.js 10.x were compiled on macOS
10.10 (Yosemite) with a minimum deployment target of macOS 10.7 (Lion).
As binaries are still being compiled to support a minimum of macOS 10.7
(Lion) we do not anticipate this having a negative impact on Node.js
10.x users with older versions of macOS.
Notable changes:
- buffer: add {read|write}Big\[U\]Int64{BE|LE} methods (garygsc)
[#19691](#19691)
- build: macOS package notarization (Rod Vagg)
[#31459](#31459)
- deps:
- update npm to 6.14.3 (Myles Borins)
[#32368](#32368)
- upgrade openssl sources to 1.1.1e (Hassaan Pasha)
[#32328](#32328)
- upgrade to libuv 1.34.2 (cjihrig)
[#31477](#31477)
- n-api:
- add napi\_get\_all\_property\_names (himself65)
[#30006](#30006)
- add APIs for per-instance state management (Gabriel Schulhof)
[#28682](#28682)
- define release 6
[#32058](#32058)
- turn NAPI\_CALL\_INTO\_MODULE into a function (Anna Henningsen)
[#26128](#26128)
- tls:
- expose keylog event on TLSSocket (Alba Mendez)
[#27654](#27654)
- support TLS min/max protocol defaults in CLI (Sam Roberts)
[#27946](#27946)
- url: handle quasi-WHATWG URLs in urlToOptions() (cjihrig)
[#26226](#26226)
PR-URL: #31984
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: #26198
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes