-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Reproduction
Steps to reproduce the behavior:
- fetch('otherdomain[.example.com') will fetch otherdomain/[.example.com
Expected behavior
I believe the request should fail, as is the case with the normal fetch api and location header within browsers.
https://tools.ietf.org/html/rfc1035
Your Environment
| software | version |
|---|---|
| node-fetch | 2.6.1 |
| node | 12.18.4 |
| npm | 6.14.8 |
| Operating System | ubuntu |
Additional context
This has security implicatons, there are circumstances where any subdomains of a specific root domain are allowed to be fetched (and are user-supplied) but node-fetch adds a forward slash and allows other domains to be fetched
Reactions are currently unavailable