Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

uri: normalization removes trailing spaces #408

Merged
merged 1 commit into from
Nov 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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