Skip to content

transformation base64Decode failed #1632

Closed
@sodd

Description

@sodd

Hi guys,
i have successfully compile and run make check ModSecurity v3.

============================================================================
Testsuite summary for modsecurity 3.0
============================================================================
# TOTAL: 4717
# PASS:  4717
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

but when i run tools/rules-check/modsec-rules-check /tmp/rule.conf
rule.conf:

#example from https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#base64decode
SecRule REQUEST_HEADERS:Authorization "^Basic ([a-zA-Z0-9]+=*)$" "phase:1,id:93,capture,chain,logdata:%{TX.1}"
  SecRule TX:1 ^(\w+): t:base64Decode,capture,chain
    SecRule TX:1 ^(admin|root|backup)$ 

I'll get this error:

 : /tmp/rule.conf  --  Loaded -1 rules.
    Rules error. File: /tmp/rule.conf. Line: 1. Column: 112. Invalid action:  data:%{TX.1}"
Test failed.

I tried to reduce whole rule to something like this, but without success :( :

 SecRule REQUEST_HEADERS:Authorization "^Basic ([a-zA-Z0-9]+=*)$" "id:93,log,t:none,t:base64Decode,pass"
 : /tmp/rule.conf  --  Loaded -1 rules.
    Rules error. File: /tmp/rule.conf. Line: 1. Column: 105. Invalid action:  t:base64Decode,pass"
Test failed.

what am I doing wrong ?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions