This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http: don't escape request path, reject bad chars
Commit 38149bb changes http.get() and http.request() to escape unsafe characters. However, that creates an incompatibility with v0.10 that is difficult to work around: if you escape the path manually, then in v0.11 it gets escaped twice. Change lib/http.js so it no longer tries to fix up bad request paths, simply reject them with an exception. The actual check is rather basic right now. The full check for illegal characters is difficult to implement efficiently because it requires a few characters of lookahead. That's why it currently only checks for spaces because those are guaranteed to create an invalid request. Fixes #5474.
- Loading branch information
1 parent
b3d1e50
commit 7124387
Showing
3 changed files
with
15 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters