Skip to content

Commit

Permalink
uri: normalization removes trailing spaces
Browse files Browse the repository at this point in the history
Ticket: #2881
  • Loading branch information
catenacyber committed Nov 7, 2023
1 parent 8bdfe7b commit f828d50
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions htp/htp_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,13 @@ int htp_parse_uri(bstr *input, htp_uri_t **uri) {

unsigned char *data = bstr_ptr(input);
size_t len = bstr_len(input);
// remove trailing spaces
while (len > 0) {
if (data[len-1] != ' ') {
break;
}
len--;
}
size_t start, pos;

if (len == 0) {
Expand Down

0 comments on commit f828d50

Please sign in to comment.