Commit 1bc84ce
url: remove \t \n \r in url.parse() similar to WHATWG
WHATWG URL removes tab, new line, and carraige return characters before
processing URL strings. To narrow the differences between WHATWG URL and
url.parse(), and thus reduce opportunities for host spoofing etc. due to
differences between the two APIs, let's do the same with url.parse().
PR-URL: #45116
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>1 parent 85cb4d7 commit 1bc84ceCopy full SHA for 1bc84ce
File tree
Expand file treeCollapse file tree
2 files changed
+11
-7
lines changedOpen diff view settings
Filter options
- lib
- test/parallel
Expand file treeCollapse file tree
2 files changed
+11
-7
lines changedOpen diff view settings
Collapse file
+4Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
319 | 319 | |
320 | 320 | |
321 | 321 | |
| 322 | + |
| 323 | + |
| 324 | + |
| 325 | + |
322 | 326 | |
323 | 327 | |
324 | 328 | |
|
Collapse file
test/parallel/test-url-parse-format.js
Copy file name to clipboardExpand all lines: test/parallel/test-url-parse-format.js+7-7Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
853 | 853 | |
854 | 854 | |
855 | 855 | |
856 | | - |
857 | | - |
| 856 | + |
| 857 | + |
858 | 858 | |
859 | | - |
| 859 | + |
860 | 860 | |
861 | 861 | |
862 | 862 | |
863 | | - |
864 | | - |
865 | | - |
| 863 | + |
| 864 | + |
| 865 | + |
866 | 866 | |
867 | 867 | |
868 | 868 | |
| ||
1007 | 1007 | |
1008 | 1008 | |
1009 | 1009 | |
1010 | | - |
| 1010 | + |
1011 | 1011 | |
1012 | 1012 | |
1013 | 1013 | |
|
0 commit comments