File tree 2 files changed +61
-18
lines changed
2 files changed +61
-18
lines changed Original file line number Diff line number Diff line change @@ -90,24 +90,21 @@ impl Host<String> {
90
90
}
91
91
92
92
let is_invalid_domain_char = |c| {
93
- matches ! (
94
- c,
95
- | '\0' ..='\u{001F}'
96
- | ' '
97
- | '#'
98
- | '%'
99
- | '/'
100
- | ':'
101
- | '<'
102
- | '>'
103
- | '?'
104
- | '@'
105
- | '['
106
- | '\\'
107
- | ']'
108
- | '^'
109
- | '\u{007F}'
110
- )
93
+ matches ! ( c, |'\0' ..='\u{001F}' | ' '
94
+ | '#'
95
+ | '%'
96
+ | '/'
97
+ | ':'
98
+ | '<'
99
+ | '>'
100
+ | '?'
101
+ | '@'
102
+ | '['
103
+ | '\\'
104
+ | ']'
105
+ | '^'
106
+ | '\u{007F}'
107
+ | '|' )
111
108
} ;
112
109
113
110
if domain. find ( is_invalid_domain_char) . is_some ( ) {
@@ -146,6 +143,7 @@ impl Host<String> {
146
143
| '\\'
147
144
| ']'
148
145
| '^'
146
+ | '|'
149
147
)
150
148
} ;
151
149
Original file line number Diff line number Diff line change 4707
4707
"base" : " about:blank" ,
4708
4708
"failure" : true
4709
4709
},
4710
+ {
4711
+ "input" : " sc://a|b/" ,
4712
+ "base" : " about:blank" ,
4713
+ "failure" : true
4714
+ },
4710
4715
" Forbidden host codepoints: tabs and newlines are removed during preprocessing" ,
4711
4716
{
4712
4717
"input" : " foo://ho\u0009 st/" ,
4931
4936
"base" : " about:blank" ,
4932
4937
"failure" : true
4933
4938
},
4939
+ {
4940
+ "input" : " http://a|b/" ,
4941
+ "base" : " about:blank" ,
4942
+ "failure" : true
4943
+ },
4934
4944
{
4935
4945
"input" : " http://a\u007F b/" ,
4936
4946
"base" : " about:blank" ,
5200
5210
"base" : " about:blank" ,
5201
5211
"failure" : true
5202
5212
},
5213
+ {
5214
+ "input" : " http://ho%7Cst/" ,
5215
+ "base" : " about:blank" ,
5216
+ "failure" : true
5217
+ },
5203
5218
{
5204
5219
"input" : " http://ho%7Fst/" ,
5205
5220
"base" : " about:blank" ,
5777
5792
"base" : " about:blank" ,
5778
5793
"failure" : true
5779
5794
},
5795
+ {
5796
+ "input" : " file://%43%7C" ,
5797
+ "base" : " about:blank" ,
5798
+ "failure" : true
5799
+ },
5800
+ {
5801
+ "input" : " file://%43|" ,
5802
+ "base" : " about:blank" ,
5803
+ "failure" : true
5804
+ },
5805
+ {
5806
+ "input" : " file://C%7C" ,
5807
+ "base" : " about:blank" ,
5808
+ "failure" : true
5809
+ },
5810
+ {
5811
+ "input" : " file://%43%7C/" ,
5812
+ "base" : " about:blank" ,
5813
+ "failure" : true
5814
+ },
5815
+ {
5816
+ "input" : " https://%43%7C/" ,
5817
+ "base" : " about:blank" ,
5818
+ "failure" : true
5819
+ },
5820
+ {
5821
+ "input" : " asdf://%43|/" ,
5822
+ "base" : " about:blank" ,
5823
+ "failure" : true
5824
+ },
5780
5825
{
5781
5826
"input" : " asdf://%43%7C/" ,
5782
5827
"base" : " about:blank" ,
You can’t perform that action at this time.
0 commit comments