Skip to content

Conversation

@Sebitosh
Copy link
Contributor

Description

#27

This tests is for target REQUEST_FILENAME (used 56 times in CRS v4.8.0). It tests the target from phase 1 to 4. The tests uses 3 requests as input with uris:

/in/uri/attack to verify the presence at the base

/attack/in/uri to verify the presence earlier in the path

/in/uri/is%3Fattack as a recreation of CVE-2024-1019

@Sebitosh Sebitosh force-pushed the request-filename branch from a17c0b5 to c77ea7f Compare May 31, 2025 18:20
@Sebitosh
Copy link
Contributor Author

Amended this with an additional negative test:

/in/uri/is?attack to verify content behind the ? does not appear in the target

@airween
Copy link
Member

airween commented Jun 1, 2025

If the ? is in the test, then it must appear in go-ftw request, see an example in CRS.

@Sebitosh
Copy link
Contributor Author

Sebitosh commented Jun 1, 2025

If the ? is in the test, then it must appear in go-ftw request, see an example in CRS.

Do you mean we should change the uris to:

/in/uri/attack?x=value

/attack/in/uri?x=value

/in/uri/is%3Fattack?x=value

To include ? ?

@airween
Copy link
Member

airween commented Jun 1, 2025

If the ? is in the test, then it must appear in go-ftw request, see an example in CRS.

Do you mean we should change the uris to:

/in/uri/attack?x=value

/attack/in/uri?x=value

/in/uri/is%3Fattack?x=value

To include ? ?

Yes.

@Sebitosh Sebitosh force-pushed the request-filename branch from c77ea7f to 3751767 Compare June 1, 2025 19:50
@Sebitosh
Copy link
Contributor Author

Sebitosh commented Jun 1, 2025

Done ! Used ?arg=value to be more explicit

Signed-off-by: Sebitosh <soloplayerdiablo@gmail.com>
@Sebitosh Sebitosh force-pushed the request-filename branch from 3751767 to 012e852 Compare June 1, 2025 19:56
@Sebitosh
Copy link
Contributor Author

Sebitosh commented Jun 1, 2025

Rebased & regenerated

@airween airween merged commit ca0e571 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