Permalink
Show file tree
Hide file tree
94 changes: 90 additions & 4 deletions
94
core/src/main/java/com/linecorp/armeria/common/HttpHeaderNames.java
78 changes: 62 additions & 16 deletions
78
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
2 changes: 1 addition & 1 deletion
2
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request from GHSA-35fr-h7jr-hh86
Motivation:
An `HttpService` can produce a malformed HTTP response when a user
specified a malformed HTTP header values, such as:
ResponseHeaders.of(HttpStatus.OK
"my-header", "foo\r\nbad-header: bar");
Modification:
- Add strict header value validation to `HttpHeadersBase`
- Add strict header name validation to `HttpHeaderNames.of()`, which is
used by `HttpHeadersBase`.
Result:
- It is not possible anymore to send a bad header value which can be
misused for sending additional headers or injecting arbitrary content.- Loading branch information
Showing
6 changed files
with
395 additions
and
84 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
Oops, something went wrong.