mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-19 18:54:23 +03:00
actions: Removes Rule parameter from runtime execute
Generals organization on the Action class
This commit is contained in:
@@ -13,28 +13,31 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include "modsecurity/rules_set.h"
|
||||
#include <string>
|
||||
|
||||
#include "modsecurity/actions/action.h"
|
||||
#include "modsecurity/transaction.h"
|
||||
#include "modsecurity/rule_message.h"
|
||||
|
||||
#include "src/actions/disruptive/disruptive_action.h"
|
||||
|
||||
|
||||
#ifndef SRC_ACTIONS_DISRUPTIVE_DENY_H_
|
||||
#define SRC_ACTIONS_DISRUPTIVE_DENY_H_
|
||||
|
||||
|
||||
namespace modsecurity {
|
||||
namespace actions {
|
||||
namespace disruptive {
|
||||
|
||||
|
||||
class Deny : public Action {
|
||||
class Deny : public ActionDisruptive {
|
||||
public:
|
||||
explicit Deny(const std::string &action) : Action(action) { }
|
||||
Deny()
|
||||
: Action("deny")
|
||||
{ }
|
||||
|
||||
bool execute(RuleWithActions *rule, Transaction *transaction) override;
|
||||
bool isDisruptive() override { return true; }
|
||||
bool execute(Transaction *transaction) noexcept override;
|
||||
};
|
||||
|
||||
|
||||
@@ -42,4 +45,5 @@ class Deny : public Action {
|
||||
} // namespace actions
|
||||
} // namespace modsecurity
|
||||
|
||||
|
||||
#endif // SRC_ACTIONS_DISRUPTIVE_DENY_H_
|
||||
|
||||
Reference in New Issue
Block a user