corazawaf / coraza-caddy

OWASP Coraza middleware for Caddy. It provides Web Application Firewall capabilities
https://www.coraza.io/
Apache License 2.0
290 stars 35 forks source link

Double break line when writing error logs #87

Closed jptosso closed 9 months ago

jptosso commented 1 year ago

Errors are printed with double break line using console log format.

2023/07/14 12:49:16.929 ERROR   http.handlers.waf       [client "xxxxx"] Coraza: Access denied (phase 1).  [file ""] [line "8164"] [id "123"] [rev ""] [msg ""] [data ""] [severity "emergency"] [ver ""] [maturity "0"] [accuracy "0"] [hostname ""] [uri "/test5"] [unique_id "lplsWtaxdPAZBEMV"]

2023/07/14 12:54:49.311 ERROR   http.handlers.waf       [client "xxxx"] Coraza: Access denied (phase 1).  [file ""] [line "8164"] [id "123"] [rev ""] [msg ""] [data ""] [severity "emergency"] [ver ""] [maturity "0"] [accuracy "0"] [hostname ""] [uri "/test5"] [unique_id "ipPVdICWZdSKCKnq"]

2023/07/14 12:56:30.860 ERROR   http.handlers.waf       [client "xxxx"] Coraza: Access denied (phase 1).  [file ""] [line "8164"] [id "123"] [rev ""] [msg ""] [data ""] [severity "emergency"] [ver ""] [maturity "0"] [accuracy "0"] [hostname ""] [uri "/test5"] [unique_id "HUDskOlODMNnKEqb"]
andremralves commented 12 months ago

Hi @jptosso, I was looking for an issue to contribute to coraza and this one seems a good one to start. I will give it a try and submit a PR.

jcchavezs commented 12 months ago

Awesome!

On Wed, 19 Jul 2023, 08:30 André Alves, @.***> wrote:

Hi @jptosso https://github.com/jptosso, I was looking for an issue to contribute to coraza and this one seems a good one to start. I will give a try and submit a PR.

— Reply to this email directly, view it on GitHub https://github.com/corazawaf/coraza-caddy/issues/87#issuecomment-1641494862, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXOYAVASXBRLMNR62B65S3XQ55JPANCNFSM6AAAAAA2KJRXRM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

M4tteoP commented 9 months ago

The upstream fix is part of Coraza 3.0.4 and Coraza-Caddy has been just updated to it via https://github.com/corazawaf/coraza-caddy/pull/102. Closing as completed!