owasp-modsecurity / ModSecurity

ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis.
https://www.modsecurity.org
Apache License 2.0
7.67k stars 1.54k forks source link

Deleted redundant code in 'ModSecurity::serverLog(...)'. #3116

Open gberkes opened 1 month ago

gberkes commented 1 month ago

The complete 'if (...) {...}' construction can be removed because the same code is executed immediately after the 'if (...) {...}' construction. When the condition evaluates to true, the same data is logged twice.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

airween commented 1 month ago

For the record: this PR solves this SonarCloud issue.