mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-01 14:15:46 +03:00
actions: Removes Rule parameter from runtime execute
Generals organization on the Action class
This commit is contained in:
@@ -13,16 +13,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "src/actions/accuracy.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include "modsecurity/actions/action.h"
|
||||
#include "modsecurity/transaction.h"
|
||||
#include "modsecurity/rule.h"
|
||||
#include "src/rule_with_actions.h"
|
||||
|
||||
|
||||
namespace modsecurity {
|
||||
namespace actions {
|
||||
@@ -30,9 +25,9 @@ namespace actions {
|
||||
|
||||
bool Accuracy::init(std::string *error) {
|
||||
try {
|
||||
m_accuracy = std::stoi(m_parser_payload);
|
||||
m_accuracy = std::stoi(m_parserPayload);
|
||||
} catch (...) {
|
||||
error->assign("Accuracy: The input \"" + m_parser_payload + "\" is " \
|
||||
error->assign("Accuracy: The input \"" + m_parserPayload + "\" is " \
|
||||
"not a number.");
|
||||
return false;
|
||||
}
|
||||
@@ -40,11 +35,5 @@ bool Accuracy::init(std::string *error) {
|
||||
}
|
||||
|
||||
|
||||
bool Accuracy::execute(RuleWithActions *rule, Transaction *transaction) {
|
||||
rule->setAccuracy(m_accuracy);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
} // namespace actions
|
||||
} // namespace modsecurity
|
||||
|
||||
Reference in New Issue
Block a user