mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 02:10:36 +03:00
Introduces ActionWithExecution
This commit is contained in:
committed by
Felipe Zimmerle
parent
7693bd33b9
commit
0a3b658969
@@ -38,7 +38,7 @@ bool Status::init(std::string *error) {
|
||||
}
|
||||
|
||||
|
||||
bool Status::execute(Transaction *transaction) noexcept {
|
||||
bool Status::execute(Transaction *transaction) const noexcept {
|
||||
transaction->m_it.status = m_status;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "modsecurity/transaction.h"
|
||||
|
||||
#include "src/actions/action_allowed_in_sec_default_action.h"
|
||||
#include "src/actions/action_with_execution.h"
|
||||
|
||||
|
||||
#ifndef SRC_ACTIONS_DATA_STATUS_H_
|
||||
@@ -31,7 +32,7 @@ namespace actions {
|
||||
namespace data {
|
||||
|
||||
|
||||
class Status : public ActionAllowedAsSecDefaultAction {
|
||||
class Status : public ActionAllowedAsSecDefaultAction, public ActionWithExecution {
|
||||
public:
|
||||
explicit Status(const std::string &action)
|
||||
: Action(action),
|
||||
@@ -40,7 +41,7 @@ class Status : public ActionAllowedAsSecDefaultAction {
|
||||
|
||||
bool init(std::string *error) override;
|
||||
|
||||
bool execute(Transaction *transaction) noexcept override;
|
||||
bool execute(Transaction *transaction) const noexcept override;
|
||||
|
||||
private:
|
||||
int m_status;
|
||||
|
||||
Reference in New Issue
Block a user