mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 03:57:47 +03:00
Adds support for RunTimeString
Using RunTimeStrings instead of runtime parser for macro expansion.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "modsecurity/actions/action.h"
|
||||
#include "src/run_time_string.h"
|
||||
|
||||
#ifndef SRC_ACTIONS_SET_SID_H_
|
||||
#define SRC_ACTIONS_SET_SID_H_
|
||||
@@ -32,11 +33,15 @@ class SetSID : public Action {
|
||||
explicit SetSID(std::string _action)
|
||||
: Action(_action) { }
|
||||
|
||||
explicit SetSID(std::unique_ptr<RunTimeString> z)
|
||||
: Action("setsid", RunTimeOnlyIfMatchKind),
|
||||
m_string(std::move(z)) { }
|
||||
|
||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||
bool init(std::string *error) override;
|
||||
|
||||
private:
|
||||
std::string m_collection_key;
|
||||
std::unique_ptr<RunTimeString> m_string;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user