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

Request header invalid 6415 v3 #411

Closed

Conversation

catenacyber
Copy link
Contributor

https://redmine.openinfosecfoundation.org/issues/6415

#409 with unit tests to new tokenization function

So that following headers and response still get processed

Ticket: #6415
For instance, the following header may be considered as valid:
Transfer-Encoding: chunked, chunked

Introduces a new helper function to recognize header value tokens

Ticket: #6415
htp/htp_util.c Show resolved Hide resolved
htp/htp_util.c Show resolved Hide resolved
@@ -2536,3 +2536,54 @@ htp_uri_t *htp_uri_alloc(void) {
char *htp_get_version(void) {
return HTP_VERSION_STRING_FULL;
}

htp_status_t htp_header_has_token(const unsigned char *hvp, size_t hvlen, const unsigned char *value) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hvp is haystack, value is needle?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, and haystack is header value, value is token to look for

htp/htp_util.c Show resolved Hide resolved
htp/htp_util.c Show resolved Hide resolved
@catenacyber
Copy link
Contributor Author

Replaced by #413

@catenacyber catenacyber closed this Jan 5, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants