mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Adds support to SecRuleScript directive
This commit is contained in:
@@ -63,6 +63,13 @@ int Driver::addSecAction(Rule *rule) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
int Driver::addSecRuleScript(RuleScript *rule) {
|
||||
m_rules[rule->m_phase].push_back(rule);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
int Driver::addSecRule(Rule *rule) {
|
||||
if (rule->m_phase > modsecurity::Phases::NUMBER_OF_PHASES) {
|
||||
m_parserError << "Unknown phase: " << std::to_string(rule->m_phase);
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#include "modsecurity/rules.h"
|
||||
#include "modsecurity/rules_properties.h"
|
||||
#include "modsecurity/audit_log.h"
|
||||
|
||||
#include "src/rule_script.h"
|
||||
#include "src/parser/seclang-parser.hh"
|
||||
|
||||
using modsecurity::Rule;
|
||||
@@ -58,6 +58,7 @@ class Driver : public RulesProperties {
|
||||
int addSecRule(Rule *rule);
|
||||
int addSecAction(Rule *rule);
|
||||
int addSecMarker(std::string marker);
|
||||
int addSecRuleScript(RuleScript *rule);
|
||||
|
||||
bool scan_begin();
|
||||
void scan_end();
|
||||
|
Reference in New Issue
Block a user