jptosso / coraza-ruleset

1 stars 0 forks source link

Unsupported directive SecUnicodeMap #2

Open ynigun opened 2 years ago

ynigun commented 2 years ago

I tried to use the config file from this repository for caddy server and I got the following error:

2021/12/09 19:14:01.918 INFO    using provided configuration    {"config_file": "test/Caddyfile", "config_adapter": ""}
2021/12/09 19:14:01.918 WARN    input is not formatted with 'caddy fmt' {"adapter": "caddyfile", "file": "test/Caddyfile", "line": 1}
2021/12/09 19:14:01.919 INFO    admin   admin endpoint started  {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["localhost:2019", "[::1]:2019", "127.0.0.1:2019"]}
2021/12/09 19:14:01.920 INFO    tls.cache.maintenance   started background certificate maintenance      {"cache": "0xc0000d6380"}
{"level":"error","ts":1639077241.92183,"msg":"[Parser] [Line 52] Unsupported directive SecUnicodeMap","line":52}
{"level":"error","ts":1639077241.9218605,"msg":"[Parser] [Line 52] Unsupported directive SecUnicodeMap","path":"/coraza/crs/custom-crs.conf"}
2021/12/09 19:14:01.921 INFO    tls.cache.maintenance   stopped background certificate maintenance      {"cache": "0xc0000d6380"}
run: loading initial config: loading new config: loading http app module: provision http: server srv0: setting up route handlers: route 0: loading handler modules: position 0: loading module 'waf': provision http.handlers.waf: [Parser] [Line 52] Unsupported directive SecUnicodeMap
jptosso commented 2 years ago

Hey, thank you for reaching out. I will add SecUnicodeMap as a placeholder for compatibility, in the meantime you can just delete the SecUnicodeMap directive from your modsecurity config file, or you can use the Coraza version from: https://github.com/jptosso/coraza-waf/blob/v2/master/coraza.conf-recommended

This repository is not required anymore as crs compatibility is working and we reached 100% compatibility, please refer to: https://coraza.io/docs/tutorials/coreruleset/ and https://www.tosso.io/blog/wordpress-with-coraza-and-coreruleset-88