mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 01:22:18 +03:00
actions: Compute the rule association during rules load
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "modsecurity/intervention.h"
|
||||
#include "modsecurity/rule.h"
|
||||
|
||||
|
||||
#ifndef HEADERS_MODSECURITY_ACTIONS_ACTION_H_
|
||||
#define HEADERS_MODSECURITY_ACTIONS_ACTION_H_
|
||||
|
||||
@@ -32,7 +33,7 @@
|
||||
namespace modsecurity {
|
||||
class Transaction;
|
||||
class RuleWithActions;
|
||||
|
||||
class RunTimeString;
|
||||
|
||||
namespace actions {
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "modsecurity/modsecurity.h"
|
||||
#include "modsecurity/variable_value.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace modsecurity {
|
||||
|
||||
@@ -70,8 +70,19 @@ class VariableValue {
|
||||
}
|
||||
}
|
||||
|
||||
VariableValue(const VariableValue &v) = delete;
|
||||
|
||||
VariableValue(const VariableValue &o) :
|
||||
m_collection(o.m_collection),
|
||||
m_key(o.m_key),
|
||||
m_keyWithCollection(o.m_keyWithCollection),
|
||||
m_value(o.m_value)
|
||||
{
|
||||
for (auto &i : o.m_orign) {
|
||||
std::unique_ptr<VariableOrigin> origin(new VariableOrigin());
|
||||
origin->m_offset = i->m_offset;
|
||||
origin->m_length = i->m_length;
|
||||
m_orign.push_back(std::move(origin));
|
||||
}
|
||||
}
|
||||
|
||||
const std::string& getKey() const {
|
||||
return m_key;
|
||||
|
||||
Reference in New Issue
Block a user