Skip to content

Commit a3effb1

Browse files
Issue #6447 - Deprecate support for UTF16 encoding in URIs (#6467)
- Merge from PR #6457. - Also brought some other ComplianceModes back to disable ambiguous empty segments, and ambiguous encodings. Signed-off-by: Lachlan Roberts <[email protected]>
1 parent 97b52e4 commit a3effb1

File tree

9 files changed

+787
-418
lines changed

9 files changed

+787
-418
lines changed

jetty-http/src/main/java/org/eclipse/jetty/http/HttpCompliance.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,21 @@ static EnumSet<HttpComplianceSection> sectionsBySpec(String spec)
132132
HttpComplianceSection.NO_FIELD_FOLDING,
133133
HttpComplianceSection.NO_HTTP_0_9,
134134
HttpComplianceSection.NO_AMBIGUOUS_PATH_SEGMENTS,
135-
HttpComplianceSection.NO_AMBIGUOUS_PATH_SEPARATORS));
135+
HttpComplianceSection.NO_AMBIGUOUS_PATH_SEPARATORS,
136+
HttpComplianceSection.NO_UTF16_ENCODINGS,
137+
HttpComplianceSection.NO_AMBIGUOUS_EMPTY_SEGMENT,
138+
HttpComplianceSection.NO_AMBIGUOUS_PATH_ENCODING));
136139
break;
137140

138141
case "*":
139142
case "RFC7230":
140143
i++;
141144
sections = EnumSet.complementOf(EnumSet.of(
142145
HttpComplianceSection.NO_AMBIGUOUS_PATH_SEGMENTS,
143-
HttpComplianceSection.NO_AMBIGUOUS_PATH_SEPARATORS));
146+
HttpComplianceSection.NO_AMBIGUOUS_PATH_SEPARATORS,
147+
HttpComplianceSection.NO_UTF16_ENCODINGS,
148+
HttpComplianceSection.NO_AMBIGUOUS_EMPTY_SEGMENT,
149+
HttpComplianceSection.NO_AMBIGUOUS_PATH_ENCODING));
144150
break;
145151

146152
default:

jetty-http/src/main/java/org/eclipse/jetty/http/HttpComplianceSection.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ public enum HttpComplianceSection
3434
MULTIPLE_CONTENT_LENGTHS("https://tools.ietf.org/html/rfc7230#section-3.3.1", "Multiple Content-Lengths"),
3535
NO_AMBIGUOUS_PATH_SEGMENTS("https://tools.ietf.org/html/rfc3986#section-3.3", "No ambiguous URI path segments"),
3636
NO_AMBIGUOUS_PATH_SEPARATORS("https://tools.ietf.org/html/rfc3986#section-3.3", "No ambiguous URI path separators"),
37-
NO_AMBIGUOUS_PATH_PARAMETERS("https://tools.ietf.org/html/rfc3986#section-3.3", "No ambiguous URI path parameters");
37+
NO_AMBIGUOUS_PATH_PARAMETERS("https://tools.ietf.org/html/rfc3986#section-3.3", "No ambiguous URI path parameters"),
38+
NO_UTF16_ENCODINGS("https://www.w3.org/International/iri-edit/draft-duerst-iri.html#anchor29", "UTF16 encoding"),
39+
NO_AMBIGUOUS_EMPTY_SEGMENT("https://tools.ietf.org/html/rfc3986#section-3.3", "Ambiguous URI empty segment"),
40+
NO_AMBIGUOUS_PATH_ENCODING("https://tools.ietf.org/html/rfc3986#section-3.3", "Ambiguous URI path encoding");
3841

3942
final String url;
4043
final String description;

0 commit comments

Comments
 (0)