mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Splits Rule class into: Rule, RuleBase, RuleMarker
This commit is contained in:
@@ -28,8 +28,8 @@ namespace actions {
|
||||
|
||||
|
||||
bool SkipAfter::evaluate(Rule *rule, Transaction *transaction) {
|
||||
ms_dbg_a(transaction, 5, "Setting skipAfter for: " + m_parser_payload);
|
||||
transaction->m_marker = m_parser_payload;
|
||||
ms_dbg_a(transaction, 5, "Setting skipAfter for: " + *m_skipName);
|
||||
transaction->addMarker(m_skipName);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
#include "modsecurity/actions/action.h"
|
||||
|
||||
@@ -30,9 +31,12 @@ namespace actions {
|
||||
class SkipAfter : public Action {
|
||||
public:
|
||||
explicit SkipAfter(const std::string &action)
|
||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||
: Action(action, RunTimeOnlyIfMatchKind),
|
||||
m_skipName(std::make_shared<std::string>(m_parser_payload)) { }
|
||||
|
||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||
private:
|
||||
std::shared_ptr<std::string> m_skipName;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user