Skip to content

Commit

Permalink
[UNDERTOW-2374] Move the check for allowUnescapedCharactersInUrl to o…
Browse files Browse the repository at this point in the history
…utside path verification loop the loop in Http2ReceiveListener.checkRequestHeaders

Signed-off-by: Flavia Rainone <frainone@redhat.com>
  • Loading branch information
fl4via committed Apr 18, 2024
1 parent ddb4aee commit 9d79fc9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ private boolean checkRequestHeaders(HeaderMap headers) {
}

// verify content of request pseudo-headers. Each header should only have a single value.
if (headers.contains(PATH)) {
if (headers.contains(PATH) && !allowUnescapedCharactersInUrl) {
for (byte b: headers.get(PATH).getFirst().getBytes(ISO_8859_1)) {
if (!allowUnescapedCharactersInUrl && !HttpRequestParser.isTargetCharacterAllowed((char)b)){
if (!HttpRequestParser.isTargetCharacterAllowed((char)b)){
return false;
}
}
Expand Down

0 comments on commit 9d79fc9

Please sign in to comment.