mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 19:47:47 +03:00
Fix `capture' memory management
The capture action was implemented before the transaction concept. While partially ported to use the transaction, some of the elements were not freed correctly. Now it is fully ported to use the class Transaction.
This commit is contained in:
@@ -32,8 +32,8 @@ bool DetectSQLi::evaluate(Transaction *transaction, const std::string &input) {
|
||||
issqli = libinjection_sqli(input.c_str(), input.length(), fingerprint);
|
||||
|
||||
if (issqli) {
|
||||
matched.push_back(fingerprint);
|
||||
if (transaction) {
|
||||
transaction->m_matched.push_back(fingerprint);
|
||||
#ifndef NO_LOGS
|
||||
transaction->debug(4, "detected SQLi using libinjection with " \
|
||||
"fingerprint '" + std::string(fingerprint) + "' at: '" +
|
||||
|
Reference in New Issue
Block a user