Correctly parse manifest URLs and reject invalid ones
See original GitHub issueThe Web App Manifest spec requires invalid URLs to be discarded and some default used instead, e.g. in the parsing of start_url
. Node’s url.resolve
is very lenient with what it accepts, and what throws as an error when passed to new URL(...)
in the browser is accepted happily in node.
One option is using whatwg-url for URL parsing
In general, using it would be an improvement in predictability, since we would be parsing URLs in node the same as they would be in the browser.
Downside: three new dependencies, as whatwg-url depends on webidl-conversions and tr46
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Swift Package Manager - Failed to parse the manifest
I'm trying to migrate a CocoaPod to SPM. It should be very simple, but for some reason I keep getting the error "Failed...
Read more >manifest_xml.py - git-repo - Git at Google
The number if the attribute is a valid number. Raises: ManifestParseError: The number is invalid. """.
Read more >Troubleshoot Azure IoT Edge common errors - Microsoft Learn
Solution. Make sure that your container registry credentials are correct your device deployment manifest. IoT Edge hub fails to start. Symptoms.
Read more >Image Manifest V 2, Schema 2 - Docker Documentation
The manifest list is the “fat manifest” which points to specific image manifests for one or more platforms. Its use is optional, and...
Read more >Troubleshooting Cloud Functions - Google Cloud
Others have to do with incorrect configuration. ... that your function is correctly signaling Cloud Functions once it has completed. ... Request rejected....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m a big fan of moving to whatwg url parser. It’s more stable, has support for
.origin
. It’s really just a polyfill until node lands the parser in nodejs core: https://github.com/nodejs/node-eps/blob/master/003-url.md & https://github.com/nodejs/node/pull/7448We can exclude it from the bundle for clientside builds, and we’ll be able to get rid of the url.js module from the browserify builds as well.
fixed in #997!