Commit fe01940
url: preserve null char in WHATWG URL errors
A null character in the middle of an invalid URL was resulting in an
error message that truncated the input string. This preserves the entire
input string in the error message.
Refs: #39592
PR-URL: #42263
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 94e5eaa commit fe01940Copy full SHA for fe01940
File tree
Expand file treeCollapse file tree
3 files changed
+15
-19
lines changedOpen diff view settings
Filter options
- lib/internal
- src
- test/parallel
Expand file treeCollapse file tree
3 files changed
+15
-19
lines changedOpen diff view settings
Collapse file
+5-3Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
559 | 559 | |
560 | 560 | |
561 | 561 | |
562 | | - |
| 562 | + |
563 | 563 | |
564 | 564 | |
565 | 565 | |
| ||
641 | 641 | |
642 | 642 | |
643 | 643 | |
644 | | - |
| 644 | + |
| 645 | + |
645 | 646 | |
646 | 647 | |
647 | 648 | |
| ||
760 | 761 | |
761 | 762 | |
762 | 763 | |
763 | | - |
| 764 | + |
| 765 | + |
764 | 766 | |
765 | 767 | |
766 | 768 | |
|
Collapse file
+2-16Lines changed: 2 additions & 16 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
142 | 142 | |
143 | 143 | |
144 | 144 | |
145 | | - |
146 | | - |
147 | | - |
148 | | - |
149 | 145 | |
150 | 146 | |
151 | 147 | |
152 | 148 | |
153 | 149 | |
154 | 150 | |
155 | | - |
156 | | - |
157 | | - |
158 | | - |
159 | | - |
160 | | - |
161 | 151 | |
162 | 152 | |
163 | 153 | |
| ||
1679 | 1669 | |
1680 | 1670 | |
1681 | 1671 | |
1682 | | - |
1683 | | - |
1684 | | - |
1685 | | - |
1686 | | - |
1687 | | - |
| 1672 | + |
| 1673 | + |
1688 | 1674 | |
1689 | 1675 | |
1690 | 1676 | |
|
Collapse file
test/parallel/test-url-null-char.js
Copy file name to clipboard+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
0 commit comments