Skip to content
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

Transformation hexDecode should not allow badly encoded inputs, or documentation should be updated #3325

Open
fzipi opened this issue Jan 9, 2025 · 1 comment
Labels
2.x Related to ModSecurity version 2.x 3.x Related to ModSecurity version 3.x

Comments

@fzipi
Copy link
Contributor

fzipi commented Jan 9, 2025

Describe the bug

This comes from this discussion: corazawaf/coraza#1253.

Technically, there is one test that accepts a string that could not be generated by hexEncode.

👉 Is this the expected behavior?

I think accepting a broken input is just prone to more errors. Don't know how this affects a possible chain of transformations.

@fzipi fzipi added 2.x Related to ModSecurity version 2.x 3.x Related to ModSecurity version 3.x labels Jan 9, 2025
@marcstern
Copy link

hexDecode should indeed check if characters are valid.
Question is what to do in case of an invalid one ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to ModSecurity version 2.x 3.x Related to ModSecurity version 3.x
Projects
None yet
Development

No branches or pull requests

2 participants