Skip to content

Test: target REQUEST_COOKIES - 059 #29

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 1, 2025

Conversation

Sebitosh
Copy link
Contributor

@Sebitosh Sebitosh commented May 6, 2025

Description

#27

Target test on REQUEST_COOKIES. Like for ARGS, we test cookies with various combinations (all, cookie1, cookie1 & cookie2, cookie regex). Went for this test as it the target is used 151 times in CRS 4.8.0 according to https://crsdoc.digitalwave.hu/?v=v4.8.0

I am unsure if this is entirely necessary, but for the request generation I added tests to confirm behavior when multiple cookies where specified (to ensure parsing multiple still works). For example, a test for the cookie regex has cookie_bar=hello;cookie_foo=attack;cookie_foobar=world to ensure the rule matches the cookie in the middle.

Assessment on V2

All tests pass on V2

Assessment on V3 (using the not yet merged #24 infra)

All tests pass on V3

@airween
Copy link
Member

airween commented Jun 1, 2025

Approved, but please resolve the conflicts.

@Sebitosh Sebitosh force-pushed the test-target-cookie branch from d4a0b7c to 77b51ec Compare June 1, 2025 19:32
@Sebitosh
Copy link
Contributor Author

Sebitosh commented Jun 1, 2025

rebased & regenerated tests

@airween airween merged commit a67f6c8 into owasp-modsecurity:main Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants