mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-19 02:40:35 +03:00
actions: Removes Rule parameter from runtime execute
Generals organization on the Action class
This commit is contained in:
@@ -13,29 +13,36 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include "modsecurity/actions/action.h"
|
||||
|
||||
#include "src/actions/action_allowed_in_sec_default_action.h"
|
||||
#include "src/actions/action_type_rule_metadata.h"
|
||||
#include "src/rule_with_actions.h"
|
||||
|
||||
|
||||
#ifndef SRC_ACTIONS_LOG_H_
|
||||
#define SRC_ACTIONS_LOG_H_
|
||||
|
||||
class Transaction;
|
||||
|
||||
namespace modsecurity {
|
||||
class Transaction;
|
||||
namespace actions {
|
||||
|
||||
|
||||
class Log : public Action {
|
||||
class Log : public ActionTypeRuleMetaData,
|
||||
public ActionAllowedAsSecDefaultAction {
|
||||
public:
|
||||
explicit Log(const std::string &action)
|
||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||
Log()
|
||||
: Action("log")
|
||||
{ }
|
||||
|
||||
void configure(RuleWithActions *rule) override {
|
||||
rule->setHasLogAction(true);
|
||||
}
|
||||
|
||||
bool execute(RuleWithActions *rule, Transaction *transaction) override;
|
||||
};
|
||||
|
||||
|
||||
} // namespace actions
|
||||
} // namespace modsecurity
|
||||
|
||||
|
||||
Reference in New Issue
Block a user