From 0a3b65896987b2630e38b426a8a8517d62bdf136 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Mon, 8 Jun 2020 13:09:47 -0300 Subject: [PATCH] Introduces ActionWithExecution --- headers/modsecurity/actions/action.h | 6 - src/actions/action_type_rule_metadata.h | 4 - src/actions/action_with_execution.h | 41 + src/actions/ctl/audit_log_parts.cc | 2 +- src/actions/ctl/audit_log_parts.h | 5 +- src/actions/ctl/request_body_access.cc | 2 +- src/actions/ctl/request_body_access.h | 5 +- .../ctl/request_body_processor_json.cc | 2 +- src/actions/ctl/request_body_processor_json.h | 5 +- .../ctl/request_body_processor_urlencoded.cc | 2 +- .../ctl/request_body_processor_urlencoded.h | 5 +- src/actions/ctl/request_body_processor_xml.cc | 2 +- src/actions/ctl/request_body_processor_xml.h | 5 +- src/actions/ctl/rule_engine.cc | 2 +- src/actions/ctl/rule_engine.h | 5 +- src/actions/ctl/rule_remove_by_id.cc | 2 +- src/actions/ctl/rule_remove_by_id.h | 5 +- src/actions/ctl/rule_remove_by_tag.cc | 2 +- src/actions/ctl/rule_remove_by_tag.h | 5 +- src/actions/ctl/rule_remove_target_by_id.cc | 2 +- src/actions/ctl/rule_remove_target_by_id.h | 5 +- src/actions/ctl/rule_remove_target_by_tag.cc | 2 +- src/actions/ctl/rule_remove_target_by_tag.h | 5 +- src/actions/data/status.cc | 2 +- src/actions/data/status.h | 5 +- src/actions/disruptive/allow.cc | 2 +- src/actions/disruptive/allow.h | 5 +- src/actions/disruptive/deny.cc | 2 +- src/actions/disruptive/deny.h | 5 +- src/actions/disruptive/drop.cc | 2 +- src/actions/disruptive/drop.h | 5 +- src/actions/disruptive/pass.cc | 2 +- src/actions/disruptive/pass.h | 5 +- src/actions/disruptive/redirect.cc | 2 +- src/actions/disruptive/redirect.h | 6 +- src/actions/exec.cc | 2 +- src/actions/exec.h | 6 +- src/actions/expire_var.h | 54 + src/actions/init_col.cc | 2 +- src/actions/init_col.h | 6 +- src/actions/log_data.cc | 2 +- src/actions/log_data.h | 5 +- src/actions/msg.cc | 2 +- src/actions/msg.h | 6 +- src/actions/set_env.cc | 2 +- src/actions/set_env.h | 6 +- src/actions/set_rsc.cc | 2 +- src/actions/set_rsc.h | 6 +- src/actions/set_sid.cc | 2 +- src/actions/set_sid.h | 6 +- src/actions/set_uid.cc | 2 +- src/actions/set_uid.h | 6 +- src/actions/set_var.cc | 2 +- src/actions/set_var.h | 5 +- src/actions/skip.cc | 2 +- src/actions/skip.h | 5 +- src/actions/skip_after.cc | 2 +- src/actions/skip_after.h | 5 +- src/actions/tag.cc | 2 +- src/actions/tag.h | 6 +- src/parser/seclang-parser.cc | 949 +++++++++--------- src/parser/seclang-parser.hh | 7 +- src/parser/seclang-parser.yy | 4 +- src/rule_with_actions.cc | 44 +- src/rule_with_actions.h | 31 +- 65 files changed, 739 insertions(+), 606 deletions(-) create mode 100644 src/actions/action_with_execution.h create mode 100644 src/actions/expire_var.h diff --git a/headers/modsecurity/actions/action.h b/headers/modsecurity/actions/action.h index 17aa922a..f44b1158 100644 --- a/headers/modsecurity/actions/action.h +++ b/headers/modsecurity/actions/action.h @@ -69,12 +69,6 @@ class Action { return true; } - - virtual bool execute(Transaction *transaction = nullptr) noexcept { - return true; - } - - const std::string *getName() const noexcept { return &m_name; } diff --git a/src/actions/action_type_rule_metadata.h b/src/actions/action_type_rule_metadata.h index a3ba810c..2470a4b8 100644 --- a/src/actions/action_type_rule_metadata.h +++ b/src/actions/action_type_rule_metadata.h @@ -37,10 +37,6 @@ class ActionTypeRuleMetaData : public virtual Action { : Action() { }; - bool execute(Transaction *t) noexcept override { - return true; - } - virtual void configure(RuleWithActions *rule) = 0; }; diff --git a/src/actions/action_with_execution.h b/src/actions/action_with_execution.h new file mode 100644 index 00000000..277b7d0d --- /dev/null +++ b/src/actions/action_with_execution.h @@ -0,0 +1,41 @@ +/* + * ModSecurity, http://www.modsecurity.org/ + * Copyright (c) 2015 - 2020 Trustwave Holdings, Inc. (http://www.trustwave.com/) + * + * You may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * If any of the files related to licensing are missing or if you have any + * other questions related to licensing please contact Trustwave Holdings, Inc. + * directly using the email address security@modsecurity.org. + * + */ + + +#include "modsecurity/actions/action.h" +#include "src/rule_with_actions.h" + +#ifndef SRC_ACTIONS_ACTION_WITH_EXECUTION_H_ +#define SRC_ACTIONS_ACTION_WITH_EXECUTION_H_ + + +namespace modsecurity { +namespace actions { + + +class ActionWithExecution : public virtual Action { + public: + ActionWithExecution() + : Action() + { }; + + virtual bool execute(Transaction *t) const noexcept = 0; +}; + + +} // namespace actions +} // namespace modsecurity + +#endif // SRC_ACTIONS_ACTION_WITH_EXECUTION_H_ diff --git a/src/actions/ctl/audit_log_parts.cc b/src/actions/ctl/audit_log_parts.cc index 3ee05bb4..d06bd6bc 100644 --- a/src/actions/ctl/audit_log_parts.cc +++ b/src/actions/ctl/audit_log_parts.cc @@ -55,7 +55,7 @@ bool AuditLogParts::init(std::string *error) { } -bool AuditLogParts::execute(Transaction *transaction) noexcept { +bool AuditLogParts::execute(Transaction *transaction) const noexcept { ms_dbg_a(transaction, 7, "AuditLog parts before modification: " + std::to_string(transaction->m_auditLogParts) + "."); diff --git a/src/actions/ctl/audit_log_parts.h b/src/actions/ctl/audit_log_parts.h index 7d1a8d6d..f1a8de67 100644 --- a/src/actions/ctl/audit_log_parts.h +++ b/src/actions/ctl/audit_log_parts.h @@ -18,6 +18,7 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_CTL_AUDIT_LOG_PARTS_H_ @@ -29,7 +30,7 @@ namespace actions { namespace ctl { -class AuditLogParts : public Action { +class AuditLogParts : public ActionWithExecution { public: explicit AuditLogParts(const std::string &action) : Action(action), @@ -38,7 +39,7 @@ class AuditLogParts : public Action { bool init(std::string *error) override; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; protected: int m_partsToModify; diff --git a/src/actions/ctl/request_body_access.cc b/src/actions/ctl/request_body_access.cc index 24fe6115..e95e2701 100644 --- a/src/actions/ctl/request_body_access.cc +++ b/src/actions/ctl/request_body_access.cc @@ -44,7 +44,7 @@ bool RequestBodyAccess::init(std::string *error) { } -bool RequestBodyAccess::execute(Transaction *transaction) noexcept { +bool RequestBodyAccess::execute(Transaction *transaction) const noexcept { if (m_requestBodyAccess) { transaction->m_requestBodyAccess = RulesSetProperties::TrueConfigBoolean; diff --git a/src/actions/ctl/request_body_access.h b/src/actions/ctl/request_body_access.h index 403b4770..c1cdb5a2 100644 --- a/src/actions/ctl/request_body_access.h +++ b/src/actions/ctl/request_body_access.h @@ -18,6 +18,7 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_CTL_REQUEST_BODY_ACCESS_H_ @@ -29,7 +30,7 @@ namespace actions { namespace ctl { -class RequestBodyAccess : public Action { +class RequestBodyAccess : public ActionWithExecution { public: explicit RequestBodyAccess(const std::string &action) : Action(action), @@ -38,7 +39,7 @@ class RequestBodyAccess : public Action { bool init(std::string *error) override; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; private: bool m_requestBodyAccess; diff --git a/src/actions/ctl/request_body_processor_json.cc b/src/actions/ctl/request_body_processor_json.cc index a68d41e6..65389955 100644 --- a/src/actions/ctl/request_body_processor_json.cc +++ b/src/actions/ctl/request_body_processor_json.cc @@ -26,7 +26,7 @@ namespace actions { namespace ctl { -bool RequestBodyProcessorJSON::execute(Transaction *transaction) noexcept { +bool RequestBodyProcessorJSON::execute(Transaction *transaction) const noexcept { transaction->m_requestBodyProcessor = Transaction::JSONRequestBody; transaction->m_variableReqbodyProcessor.set("JSON", transaction->m_variableOffset); diff --git a/src/actions/ctl/request_body_processor_json.h b/src/actions/ctl/request_body_processor_json.h index 0cec2a8c..ac0dd41d 100644 --- a/src/actions/ctl/request_body_processor_json.h +++ b/src/actions/ctl/request_body_processor_json.h @@ -18,6 +18,7 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_JSON_H_ @@ -29,13 +30,13 @@ namespace actions { namespace ctl { -class RequestBodyProcessorJSON : public Action { +class RequestBodyProcessorJSON : public ActionWithExecution { public: explicit RequestBodyProcessorJSON(const std::string &action) : Action(action) { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; }; diff --git a/src/actions/ctl/request_body_processor_urlencoded.cc b/src/actions/ctl/request_body_processor_urlencoded.cc index 12c0f7e9..9394937b 100644 --- a/src/actions/ctl/request_body_processor_urlencoded.cc +++ b/src/actions/ctl/request_body_processor_urlencoded.cc @@ -27,7 +27,7 @@ namespace ctl { bool RequestBodyProcessorURLENCODED::execute( - Transaction *transaction) noexcept { + Transaction *transaction) const noexcept { transaction->m_requestBodyType = Transaction::WWWFormUrlEncoded; transaction->m_variableReqbodyProcessor.set("URLENCODED", transaction->m_variableOffset); diff --git a/src/actions/ctl/request_body_processor_urlencoded.h b/src/actions/ctl/request_body_processor_urlencoded.h index a4c94e97..28044d65 100644 --- a/src/actions/ctl/request_body_processor_urlencoded.h +++ b/src/actions/ctl/request_body_processor_urlencoded.h @@ -18,6 +18,7 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_URLENCODED_H_ @@ -29,13 +30,13 @@ namespace actions { namespace ctl { -class RequestBodyProcessorURLENCODED : public Action { +class RequestBodyProcessorURLENCODED : public ActionWithExecution { public: explicit RequestBodyProcessorURLENCODED(const std::string &action) : Action(action) { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; }; diff --git a/src/actions/ctl/request_body_processor_xml.cc b/src/actions/ctl/request_body_processor_xml.cc index 5331dc55..ca281734 100644 --- a/src/actions/ctl/request_body_processor_xml.cc +++ b/src/actions/ctl/request_body_processor_xml.cc @@ -26,7 +26,7 @@ namespace actions { namespace ctl { -bool RequestBodyProcessorXML::execute(Transaction *transaction) noexcept { +bool RequestBodyProcessorXML::execute(Transaction *transaction) const noexcept { transaction->m_requestBodyProcessor = Transaction::XMLRequestBody; transaction->m_variableReqbodyProcessor.set("XML", transaction->m_variableOffset); diff --git a/src/actions/ctl/request_body_processor_xml.h b/src/actions/ctl/request_body_processor_xml.h index fab8d358..46bb85a7 100644 --- a/src/actions/ctl/request_body_processor_xml.h +++ b/src/actions/ctl/request_body_processor_xml.h @@ -18,6 +18,7 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_CTL_REQUEST_BODY_PROCESSOR_XML_H_ @@ -29,13 +30,13 @@ namespace actions { namespace ctl { -class RequestBodyProcessorXML : public Action { +class RequestBodyProcessorXML : public ActionWithExecution { public: explicit RequestBodyProcessorXML(const std::string &action) : Action(action) { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; }; diff --git a/src/actions/ctl/rule_engine.cc b/src/actions/ctl/rule_engine.cc index cbd4d073..81612af7 100644 --- a/src/actions/ctl/rule_engine.cc +++ b/src/actions/ctl/rule_engine.cc @@ -47,7 +47,7 @@ bool RuleEngine::init(std::string *error) { } -bool RuleEngine::execute(Transaction *transaction) noexcept { +bool RuleEngine::execute(Transaction *transaction) const noexcept { std::stringstream a; a << "Setting SecRuleEngine to "; a << modsecurity::RulesSetProperties::ruleEngineStateString(m_ruleEngine); diff --git a/src/actions/ctl/rule_engine.h b/src/actions/ctl/rule_engine.h index ee66d55b..c8c87f43 100644 --- a/src/actions/ctl/rule_engine.h +++ b/src/actions/ctl/rule_engine.h @@ -18,6 +18,7 @@ #include "modsecurity/rules_set_properties.h" #include "modsecurity/actions/action.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_CTL_RULE_ENGINE_H_ @@ -29,7 +30,7 @@ namespace actions { namespace ctl { -class RuleEngine : public Action { +class RuleEngine : public ActionWithExecution { public: explicit RuleEngine(const std::string &action) : Action(action), @@ -38,7 +39,7 @@ class RuleEngine : public Action { bool init(std::string *error) override; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; private: RulesSetProperties::RuleEngine m_ruleEngine; diff --git a/src/actions/ctl/rule_remove_by_id.cc b/src/actions/ctl/rule_remove_by_id.cc index 846fee82..f6fb9b7b 100644 --- a/src/actions/ctl/rule_remove_by_id.cc +++ b/src/actions/ctl/rule_remove_by_id.cc @@ -88,7 +88,7 @@ bool RuleRemoveById::init(std::string *error) { } -bool RuleRemoveById::execute(Transaction *transaction) noexcept { +bool RuleRemoveById::execute(Transaction *transaction) const noexcept { for (auto &i : m_ids) { transaction->m_ruleRemoveById.push_back(i); } diff --git a/src/actions/ctl/rule_remove_by_id.h b/src/actions/ctl/rule_remove_by_id.h index debd6a66..b4e06fb9 100644 --- a/src/actions/ctl/rule_remove_by_id.h +++ b/src/actions/ctl/rule_remove_by_id.h @@ -20,6 +20,7 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_CTL_RULE_REMOVE_BY_ID_H_ @@ -31,7 +32,7 @@ namespace actions { namespace ctl { -class RuleRemoveById : public Action { +class RuleRemoveById : public ActionWithExecution { public: explicit RuleRemoveById(const std::string &action) : Action(action) @@ -39,7 +40,7 @@ class RuleRemoveById : public Action { bool init(std::string *error) override; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; private: std::list > m_ranges; diff --git a/src/actions/ctl/rule_remove_by_tag.cc b/src/actions/ctl/rule_remove_by_tag.cc index 6ebdc31c..0d491256 100644 --- a/src/actions/ctl/rule_remove_by_tag.cc +++ b/src/actions/ctl/rule_remove_by_tag.cc @@ -34,7 +34,7 @@ bool RuleRemoveByTag::init(std::string *error) { } -bool RuleRemoveByTag::execute(Transaction *transaction) noexcept { +bool RuleRemoveByTag::execute(Transaction *transaction) const noexcept { transaction->m_ruleRemoveByTag.push_back(m_tag); return true; } diff --git a/src/actions/ctl/rule_remove_by_tag.h b/src/actions/ctl/rule_remove_by_tag.h index fa5fd53c..3461b636 100644 --- a/src/actions/ctl/rule_remove_by_tag.h +++ b/src/actions/ctl/rule_remove_by_tag.h @@ -18,6 +18,7 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_CTL_RULE_REMOVE_BY_TAG_H_ @@ -29,7 +30,7 @@ namespace actions { namespace ctl { -class RuleRemoveByTag : public Action { +class RuleRemoveByTag : public ActionWithExecution { public: explicit RuleRemoveByTag(const std::string &action) : Action(action), @@ -38,7 +39,7 @@ class RuleRemoveByTag : public Action { bool init(std::string *error) override; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; private: std::string m_tag; diff --git a/src/actions/ctl/rule_remove_target_by_id.cc b/src/actions/ctl/rule_remove_target_by_id.cc index 236dfa64..def0ad7d 100644 --- a/src/actions/ctl/rule_remove_target_by_id.cc +++ b/src/actions/ctl/rule_remove_target_by_id.cc @@ -53,7 +53,7 @@ bool RuleRemoveTargetById::init(std::string *error) { } -bool RuleRemoveTargetById::execute(Transaction *transaction) noexcept { +bool RuleRemoveTargetById::execute(Transaction *transaction) const noexcept { transaction->m_ruleRemoveTargetById.push_back( std::make_pair(m_id, m_target)); return true; diff --git a/src/actions/ctl/rule_remove_target_by_id.h b/src/actions/ctl/rule_remove_target_by_id.h index 62ac870e..7dfec0f1 100644 --- a/src/actions/ctl/rule_remove_target_by_id.h +++ b/src/actions/ctl/rule_remove_target_by_id.h @@ -18,6 +18,7 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_CTL_RULE_REMOVE_TARGET_BY_ID_H_ @@ -29,7 +30,7 @@ namespace actions { namespace ctl { -class RuleRemoveTargetById : public Action { +class RuleRemoveTargetById : public ActionWithExecution { public: explicit RuleRemoveTargetById(const std::string &action) : Action(action), @@ -39,7 +40,7 @@ class RuleRemoveTargetById : public Action { bool init(std::string *error) override; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; private: int m_id; diff --git a/src/actions/ctl/rule_remove_target_by_tag.cc b/src/actions/ctl/rule_remove_target_by_tag.cc index 8d676a14..6f30df65 100644 --- a/src/actions/ctl/rule_remove_target_by_tag.cc +++ b/src/actions/ctl/rule_remove_target_by_tag.cc @@ -46,7 +46,7 @@ bool RuleRemoveTargetByTag::init(std::string *error) { } -bool RuleRemoveTargetByTag::execute(Transaction *transaction) noexcept { +bool RuleRemoveTargetByTag::execute(Transaction *transaction) const noexcept { transaction->m_ruleRemoveTargetByTag.push_back( std::make_pair(m_tag, m_target)); return true; diff --git a/src/actions/ctl/rule_remove_target_by_tag.h b/src/actions/ctl/rule_remove_target_by_tag.h index 90ab530d..eadc4e0f 100644 --- a/src/actions/ctl/rule_remove_target_by_tag.h +++ b/src/actions/ctl/rule_remove_target_by_tag.h @@ -18,6 +18,7 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_CTL_RULE_REMOVE_TARGET_BY_TAG_H_ @@ -29,7 +30,7 @@ namespace actions { namespace ctl { -class RuleRemoveTargetByTag : public Action { +class RuleRemoveTargetByTag : public ActionWithExecution { public: explicit RuleRemoveTargetByTag(const std::string &action) : Action(action) @@ -37,7 +38,7 @@ class RuleRemoveTargetByTag : public Action { bool init(std::string *error) override; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; private: std::string m_tag; diff --git a/src/actions/data/status.cc b/src/actions/data/status.cc index a6702e89..93213316 100644 --- a/src/actions/data/status.cc +++ b/src/actions/data/status.cc @@ -38,7 +38,7 @@ bool Status::init(std::string *error) { } -bool Status::execute(Transaction *transaction) noexcept { +bool Status::execute(Transaction *transaction) const noexcept { transaction->m_it.status = m_status; return true; } diff --git a/src/actions/data/status.h b/src/actions/data/status.h index b96a3d4a..b5d51ba7 100644 --- a/src/actions/data/status.h +++ b/src/actions/data/status.h @@ -20,6 +20,7 @@ #include "modsecurity/transaction.h" #include "src/actions/action_allowed_in_sec_default_action.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_DATA_STATUS_H_ @@ -31,7 +32,7 @@ namespace actions { namespace data { -class Status : public ActionAllowedAsSecDefaultAction { +class Status : public ActionAllowedAsSecDefaultAction, public ActionWithExecution { public: explicit Status(const std::string &action) : Action(action), @@ -40,7 +41,7 @@ class Status : public ActionAllowedAsSecDefaultAction { bool init(std::string *error) override; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; private: int m_status; diff --git a/src/actions/disruptive/allow.cc b/src/actions/disruptive/allow.cc index 9d1b0575..c644ee74 100644 --- a/src/actions/disruptive/allow.cc +++ b/src/actions/disruptive/allow.cc @@ -52,7 +52,7 @@ bool Allow::init(std::string *error) { } -bool Allow::execute(Transaction *transaction) noexcept { +bool Allow::execute(Transaction *transaction) const noexcept { ms_dbg_a(transaction, 4, "Dropping the evaluation of upcoming rules " \ "in favor of an `allow' action of type: " \ + allowTypeToName(m_allowType)); diff --git a/src/actions/disruptive/allow.h b/src/actions/disruptive/allow.h index 2f94f961..e8dd14e7 100644 --- a/src/actions/disruptive/allow.h +++ b/src/actions/disruptive/allow.h @@ -20,6 +20,7 @@ #include "modsecurity/transaction.h" #include "src/actions/disruptive/disruptive_action.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_DISRUPTIVE_ALLOW_H_ @@ -51,7 +52,7 @@ enum AllowType : int { }; -class Allow : public ActionDisruptive { +class Allow : public ActionDisruptive, public ActionWithExecution { public: explicit Allow(const std::string &action) : Action(action), @@ -60,7 +61,7 @@ class Allow : public ActionDisruptive { bool init(std::string *error) override; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; private: AllowType m_allowType; diff --git a/src/actions/disruptive/deny.cc b/src/actions/disruptive/deny.cc index 89d2b871..44e17621 100644 --- a/src/actions/disruptive/deny.cc +++ b/src/actions/disruptive/deny.cc @@ -32,7 +32,7 @@ namespace actions { namespace disruptive { -bool Deny::execute(Transaction *transaction) noexcept { +bool Deny::execute(Transaction *transaction) const noexcept { ms_dbg_a(transaction, 8, "Running action deny"); if (transaction->m_it.status == 200) { diff --git a/src/actions/disruptive/deny.h b/src/actions/disruptive/deny.h index 703f3742..21381f49 100644 --- a/src/actions/disruptive/deny.h +++ b/src/actions/disruptive/deny.h @@ -20,6 +20,7 @@ #include "modsecurity/transaction.h" #include "src/actions/disruptive/disruptive_action.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_DISRUPTIVE_DENY_H_ @@ -31,13 +32,13 @@ namespace actions { namespace disruptive { -class Deny : public ActionDisruptive { +class Deny : public ActionDisruptive, public ActionWithExecution { public: Deny() : Action("deny") { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; }; diff --git a/src/actions/disruptive/drop.cc b/src/actions/disruptive/drop.cc index 3243e471..a4f1864a 100644 --- a/src/actions/disruptive/drop.cc +++ b/src/actions/disruptive/drop.cc @@ -32,7 +32,7 @@ namespace actions { namespace disruptive { -bool Drop::execute(Transaction *transaction) noexcept { +bool Drop::execute(Transaction *transaction) const noexcept { ms_dbg_a(transaction, 8, "Running action drop " \ "[executing deny instead of drop.]"); diff --git a/src/actions/disruptive/drop.h b/src/actions/disruptive/drop.h index d9ac8be4..840bf830 100644 --- a/src/actions/disruptive/drop.h +++ b/src/actions/disruptive/drop.h @@ -20,6 +20,7 @@ #include "modsecurity/transaction.h" #include "src/actions/disruptive/disruptive_action.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_DISRUPTIVE_DROP_H_ @@ -31,13 +32,13 @@ namespace actions { namespace disruptive { -class Drop : public ActionDisruptive { +class Drop : public ActionDisruptive, public ActionWithExecution { public: Drop() : Action("drop") { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; }; diff --git a/src/actions/disruptive/pass.cc b/src/actions/disruptive/pass.cc index ee20ed14..84941334 100644 --- a/src/actions/disruptive/pass.cc +++ b/src/actions/disruptive/pass.cc @@ -31,7 +31,7 @@ namespace actions { namespace disruptive { -bool Pass::execute(Transaction *transaction) noexcept { +bool Pass::execute(Transaction *transaction) const noexcept { intervention::free(&transaction->m_it); intervention::reset(&transaction->m_it); diff --git a/src/actions/disruptive/pass.h b/src/actions/disruptive/pass.h index a09e3fa5..023aa210 100644 --- a/src/actions/disruptive/pass.h +++ b/src/actions/disruptive/pass.h @@ -20,6 +20,7 @@ #include "modsecurity/transaction.h" #include "src/actions/disruptive/disruptive_action.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_DISRUPTIVE_PASS_H_ @@ -31,13 +32,13 @@ namespace actions { namespace disruptive { -class Pass : public ActionDisruptive { +class Pass : public ActionDisruptive, public ActionWithExecution { public: Pass() : Action("pass") { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; }; diff --git a/src/actions/disruptive/redirect.cc b/src/actions/disruptive/redirect.cc index 13a64643..fd419386 100644 --- a/src/actions/disruptive/redirect.cc +++ b/src/actions/disruptive/redirect.cc @@ -32,7 +32,7 @@ namespace actions { namespace disruptive { -bool Redirect::execute(Transaction *transaction) noexcept { +bool Redirect::execute(Transaction *transaction) const noexcept { std::string m_urlExpanded(getEvaluatedRunTimeString(transaction)); /* if it was changed before, lets keep it. */ if (transaction->m_it.status == 200 diff --git a/src/actions/disruptive/redirect.h b/src/actions/disruptive/redirect.h index 6f00af7f..a4094b63 100644 --- a/src/actions/disruptive/redirect.h +++ b/src/actions/disruptive/redirect.h @@ -24,6 +24,7 @@ #include "src/actions/action_with_run_time_string.h" #include "src/actions/disruptive/disruptive_action.h" #include "src/run_time_string.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_DISRUPTIVE_REDIRECT_H_ @@ -35,7 +36,8 @@ namespace actions { namespace disruptive { -class Redirect : public ActionWithRunTimeString, public ActionDisruptive { +class Redirect : public ActionWithRunTimeString, public ActionDisruptive, + public ActionWithExecution { public: explicit Redirect(std::unique_ptr runTimeString) : ActionWithRunTimeString(std::move(runTimeString)), @@ -52,7 +54,7 @@ class Redirect : public ActionWithRunTimeString, public ActionDisruptive { { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; ActionWithRunTimeString *clone() override { diff --git a/src/actions/exec.cc b/src/actions/exec.cc index 3d8b6601..5047846f 100644 --- a/src/actions/exec.cc +++ b/src/actions/exec.cc @@ -52,7 +52,7 @@ bool Exec::init(std::string *error) { } -bool Exec::execute(Transaction *t) noexcept { +bool Exec::execute(Transaction *t) const noexcept { ms_dbg_a(t, 8, "Running script... " + m_script); m_lua.run(t); return true; diff --git a/src/actions/exec.h b/src/actions/exec.h index 7fca049f..6398ea9d 100644 --- a/src/actions/exec.h +++ b/src/actions/exec.h @@ -18,6 +18,8 @@ #include "modsecurity/actions/action.h" #include "src/engine/lua.h" +#include "src/actions/action_with_execution.h" + #ifndef SRC_ACTIONS_EXEC_H_ #define SRC_ACTIONS_EXEC_H_ @@ -27,7 +29,7 @@ namespace modsecurity { namespace actions { -class Exec : public Action { +class Exec : public ActionWithExecution { public: explicit Exec(const std::string &action) : Action(action), @@ -36,7 +38,7 @@ class Exec : public Action { ~Exec() { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; bool init(std::string *error) override; private: diff --git a/src/actions/expire_var.h b/src/actions/expire_var.h new file mode 100644 index 00000000..415fb146 --- /dev/null +++ b/src/actions/expire_var.h @@ -0,0 +1,54 @@ +/* + * ModSecurity, http://www.modsecurity.org/ + * Copyright (c) 2015 - 2020 Trustwave Holdings, Inc. (http://www.trustwave.com/) + * + * You may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * If any of the files related to licensing are missing or if you have any + * other questions related to licensing please contact Trustwave Holdings, Inc. + * directly using the email address security@modsecurity.org. + * + */ + + +#include +#include +#include + +#include "modsecurity/actions/action.h" +#include "modsecurity/transaction.h" +#include "src/actions/action_with_run_time_string.h" +#include "src/actions/action_with_execution.h" + + +#ifndef SRC_ACTIONS_EXPIRE_VAR_H_ +#define SRC_ACTIONS_EXPIRE_VAR_H_ + + +namespace modsecurity { +namespace actions { + + +class ExpireVar : public ActionWithExecution { + public: + explicit ExpireVar(const std::string &action) + : Action(action) + { } + + ~ExpireVar() { } + + bool execute(Transaction *transaction) const noexcept override { return true; }; + bool init(std::string *error) override { return true; }; + + private: +}; + + +} // namespace actions +} // namespace modsecurity + + +#endif // SRC_ACTIONS_EXPIRE_VAR_H_ diff --git a/src/actions/init_col.cc b/src/actions/init_col.cc index 2de14054..fb4b48b8 100644 --- a/src/actions/init_col.cc +++ b/src/actions/init_col.cc @@ -57,7 +57,7 @@ bool InitCol::init(std::string *error) { } -bool InitCol::execute(Transaction *t) noexcept { +bool InitCol::execute(Transaction *t) const noexcept { std::string collectionName(getEvaluatedRunTimeString(t)); if (m_collection_key == "ip") { diff --git a/src/actions/init_col.h b/src/actions/init_col.h index 3554a17d..58a34de8 100644 --- a/src/actions/init_col.h +++ b/src/actions/init_col.h @@ -20,6 +20,8 @@ #include "modsecurity/actions/action.h" #include "src/actions/action_with_run_time_string.h" +#include "src/actions/action_with_execution.h" + #ifndef SRC_ACTIONS_INIT_COL_H_ #define SRC_ACTIONS_INIT_COL_H_ @@ -30,7 +32,7 @@ class Transaction; namespace actions { -class InitCol : public ActionWithRunTimeString { +class InitCol : public ActionWithRunTimeString, public ActionWithExecution { public: InitCol( const std::string &action, @@ -47,7 +49,7 @@ class InitCol : public ActionWithRunTimeString { bool init(std::string *error) override; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; ActionWithRunTimeString *clone() override { return new InitCol(*this); diff --git a/src/actions/log_data.cc b/src/actions/log_data.cc index f9a73b7d..ed8fa44b 100644 --- a/src/actions/log_data.cc +++ b/src/actions/log_data.cc @@ -25,7 +25,7 @@ namespace modsecurity { namespace actions { -bool LogData::execute(Transaction *transaction) noexcept { +bool LogData::execute(Transaction *transaction) const noexcept { transaction->messageGetLast()->m_data = getEvaluatedRunTimeString(transaction); return true; diff --git a/src/actions/log_data.h b/src/actions/log_data.h index a4f8fabf..3aacd7f4 100644 --- a/src/actions/log_data.h +++ b/src/actions/log_data.h @@ -18,6 +18,7 @@ #include "src/actions/action_with_run_time_string.h" #include "src/run_time_string.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_LOG_DATA_H_ @@ -28,7 +29,7 @@ namespace modsecurity { namespace actions { -class LogData : public ActionWithRunTimeString { +class LogData : public ActionWithRunTimeString, public ActionWithExecution { public: explicit LogData(std::unique_ptr runTimeString) : ActionWithRunTimeString(std::move(runTimeString)), @@ -40,7 +41,7 @@ class LogData : public ActionWithRunTimeString { Action(data) { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; ActionWithRunTimeString *clone() override { return new LogData(*this); diff --git a/src/actions/msg.cc b/src/actions/msg.cc index e882fab3..157e7104 100644 --- a/src/actions/msg.cc +++ b/src/actions/msg.cc @@ -49,7 +49,7 @@ namespace modsecurity { namespace actions { -bool Msg::execute(Transaction *transaction) noexcept { +bool Msg::execute(Transaction *transaction) const noexcept { std::string msg = getEvaluatedRunTimeString(transaction); transaction->messageGetLast()->m_message = msg; ms_dbg_a(transaction, 9, "Saving msg: " + msg); diff --git a/src/actions/msg.h b/src/actions/msg.h index eea2ce67..5379258a 100644 --- a/src/actions/msg.h +++ b/src/actions/msg.h @@ -21,6 +21,8 @@ #include "modsecurity/actions/action.h" #include "modsecurity/rule_message.h" #include "src/actions/action_with_run_time_string.h" +#include "src/actions/action_with_execution.h" + #ifndef SRC_ACTIONS_MSG_H_ #define SRC_ACTIONS_MSG_H_ @@ -32,7 +34,7 @@ class Transaction; namespace actions { -class Msg : public ActionWithRunTimeString { +class Msg : public ActionWithRunTimeString, public ActionWithExecution { public: explicit Msg(std::unique_ptr runTimeString) : ActionWithRunTimeString(std::move(runTimeString)), @@ -44,7 +46,7 @@ class Msg : public ActionWithRunTimeString { Action(action) { }; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; ActionWithRunTimeString *clone() override { return new Msg(*this); diff --git a/src/actions/set_env.cc b/src/actions/set_env.cc index 38131973..f802954c 100644 --- a/src/actions/set_env.cc +++ b/src/actions/set_env.cc @@ -32,7 +32,7 @@ namespace modsecurity { namespace actions { -bool SetENV::execute(Transaction *t) noexcept { +bool SetENV::execute(Transaction *t) const noexcept { std::string colNameExpanded(getEvaluatedRunTimeString(t)); ms_dbg_a(t, 8, "Setting envoriment variable: " diff --git a/src/actions/set_env.h b/src/actions/set_env.h index d150b6aa..d60a11da 100644 --- a/src/actions/set_env.h +++ b/src/actions/set_env.h @@ -20,6 +20,8 @@ #include "modsecurity/actions/action.h" #include "src/actions/action_with_run_time_string.h" +#include "src/actions/action_with_execution.h" + #ifndef SRC_ACTIONS_SET_ENV_H_ #define SRC_ACTIONS_SET_ENV_H_ @@ -31,7 +33,7 @@ class Transaction; namespace actions { -class SetENV : public ActionWithRunTimeString { +class SetENV : public ActionWithRunTimeString, public ActionWithExecution { public: explicit SetENV(std::unique_ptr runTimeString) : ActionWithRunTimeString(std::move(runTimeString)), @@ -43,7 +45,7 @@ class SetENV : public ActionWithRunTimeString { Action(action) { }; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; ActionWithRunTimeString *clone() override { return new SetENV(*this); diff --git a/src/actions/set_rsc.cc b/src/actions/set_rsc.cc index dc3ddbea..75c35e05 100644 --- a/src/actions/set_rsc.cc +++ b/src/actions/set_rsc.cc @@ -30,7 +30,7 @@ namespace modsecurity { namespace actions { -bool SetRSC::execute(Transaction *t) noexcept { +bool SetRSC::execute(Transaction *t) const noexcept { std::string colNameExpanded(getEvaluatedRunTimeString(t)); ms_dbg_a(t, 8, "RESOURCE initiated with value: \'" + colNameExpanded + "\'."); diff --git a/src/actions/set_rsc.h b/src/actions/set_rsc.h index f83bd479..058f5365 100644 --- a/src/actions/set_rsc.h +++ b/src/actions/set_rsc.h @@ -20,6 +20,8 @@ #include "modsecurity/actions/action.h" #include "src/actions/action_with_run_time_string.h" +#include "src/actions/action_with_execution.h" + #ifndef SRC_ACTIONS_SET_RSC_H_ #define SRC_ACTIONS_SET_RSC_H_ @@ -31,7 +33,7 @@ class Transaction; namespace actions { -class SetRSC : public ActionWithRunTimeString { +class SetRSC : public ActionWithRunTimeString, public ActionWithExecution { public: explicit SetRSC(std::unique_ptr runTimeString) : ActionWithRunTimeString(std::move(runTimeString)), @@ -43,7 +45,7 @@ class SetRSC : public ActionWithRunTimeString { Action(action) { }; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; ActionWithRunTimeString *clone() override { return new SetRSC(*this); diff --git a/src/actions/set_sid.cc b/src/actions/set_sid.cc index 5983745e..820edb4e 100644 --- a/src/actions/set_sid.cc +++ b/src/actions/set_sid.cc @@ -30,7 +30,7 @@ namespace modsecurity { namespace actions { -bool SetSID::execute(Transaction *t) noexcept { +bool SetSID::execute(Transaction *t) const noexcept { std::string colNameExpanded(getEvaluatedRunTimeString(t)); ms_dbg_a(t, 8, "Session ID initiated with value: \'" + colNameExpanded + "\'."); diff --git a/src/actions/set_sid.h b/src/actions/set_sid.h index d7b8c1a4..2928a18a 100644 --- a/src/actions/set_sid.h +++ b/src/actions/set_sid.h @@ -20,6 +20,8 @@ #include "modsecurity/actions/action.h" #include "src/actions/action_with_run_time_string.h" +#include "src/actions/action_with_execution.h" + #ifndef SRC_ACTIONS_SET_SID_H_ #define SRC_ACTIONS_SET_SID_H_ @@ -31,7 +33,7 @@ class Transaction; namespace actions { -class SetSID : public ActionWithRunTimeString { +class SetSID : public ActionWithRunTimeString, public ActionWithExecution { public: explicit SetSID(std::unique_ptr runTimeString) : ActionWithRunTimeString(std::move(runTimeString)), @@ -43,7 +45,7 @@ class SetSID : public ActionWithRunTimeString { Action(action) { }; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; ActionWithRunTimeString *clone() override { return new SetSID(*this); diff --git a/src/actions/set_uid.cc b/src/actions/set_uid.cc index 958d634b..7069a1ca 100644 --- a/src/actions/set_uid.cc +++ b/src/actions/set_uid.cc @@ -30,7 +30,7 @@ namespace modsecurity { namespace actions { -bool SetUID::execute(Transaction *t) noexcept { +bool SetUID::execute(Transaction *t) const noexcept { std::string colNameExpanded(getEvaluatedRunTimeString(t)); ms_dbg_a(t, 8, "User collection initiated with value: \'" + colNameExpanded + "\'."); diff --git a/src/actions/set_uid.h b/src/actions/set_uid.h index 5eaa2a0c..4a7c363a 100644 --- a/src/actions/set_uid.h +++ b/src/actions/set_uid.h @@ -20,6 +20,8 @@ #include "modsecurity/actions/action.h" #include "src/actions/action_with_run_time_string.h" +#include "src/actions/action_with_execution.h" + #ifndef SRC_ACTIONS_SET_UID_H_ #define SRC_ACTIONS_SET_UID_H_ @@ -31,7 +33,7 @@ class Transaction; namespace actions { -class SetUID : public ActionWithRunTimeString { +class SetUID : public ActionWithRunTimeString, public ActionWithExecution { public: explicit SetUID(std::unique_ptr runTimeString) : ActionWithRunTimeString(std::move(runTimeString)), @@ -43,7 +45,7 @@ class SetUID : public ActionWithRunTimeString { Action(action) { }; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; ActionWithRunTimeString *clone() override { return new SetUID(*this); diff --git a/src/actions/set_var.cc b/src/actions/set_var.cc index 2b07940c..a69a16e6 100644 --- a/src/actions/set_var.cc +++ b/src/actions/set_var.cc @@ -42,7 +42,7 @@ bool SetVar::init(std::string *error) { } -bool SetVar::execute(Transaction *t) noexcept { +bool SetVar::execute(Transaction *t) const noexcept { std::string targetValue; std::string resolvedPre; diff --git a/src/actions/set_var.h b/src/actions/set_var.h index e200447c..3e1f29b7 100644 --- a/src/actions/set_var.h +++ b/src/actions/set_var.h @@ -23,6 +23,7 @@ #include "src/actions/action_with_run_time_string.h" #include "src/variables/variable_with_runtime_string.h" #include "src/rule_with_operator.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_SET_VAR_H_ @@ -47,7 +48,7 @@ enum SetVarOperation { }; -class SetVar : public ActionWithRunTimeString { +class SetVar : public ActionWithRunTimeString, public ActionWithExecution { public: SetVar(SetVarOperation operation, std::unique_ptr variable, @@ -84,7 +85,7 @@ class SetVar : public ActionWithRunTimeString { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; bool init(std::string *error) override; void populate(RuleWithActions *rule) override { diff --git a/src/actions/skip.cc b/src/actions/skip.cc index 07e69693..994e9e91 100644 --- a/src/actions/skip.cc +++ b/src/actions/skip.cc @@ -42,7 +42,7 @@ bool Skip::init(std::string *error) { } -bool Skip::execute(Transaction *transaction) noexcept { +bool Skip::execute(Transaction *transaction) const noexcept { ms_dbg_a(transaction, 5, "Skipping the next " + \ std::to_string(m_skip_next) + " rules."); diff --git a/src/actions/skip.h b/src/actions/skip.h index 35898e2b..6d362eb5 100644 --- a/src/actions/skip.h +++ b/src/actions/skip.h @@ -17,6 +17,7 @@ #include #include "modsecurity/actions/action.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_SKIP_H_ @@ -29,14 +30,14 @@ class Transaction; namespace actions { -class Skip : public Action { +class Skip : public ActionWithExecution { public: explicit Skip(const std::string &action) : Action(action), m_skip_next(0) { } bool init(std::string *error) override; - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; private: int m_skip_next; diff --git a/src/actions/skip_after.cc b/src/actions/skip_after.cc index 5033df95..61daf115 100644 --- a/src/actions/skip_after.cc +++ b/src/actions/skip_after.cc @@ -30,7 +30,7 @@ namespace modsecurity { namespace actions { -bool SkipAfter::execute(Transaction *transaction) noexcept { +bool SkipAfter::execute(Transaction *transaction) const noexcept { ms_dbg_a(transaction, 5, "Setting skipAfter for: " + *m_skipName); transaction->addMarker(m_skipName); return true; diff --git a/src/actions/skip_after.h b/src/actions/skip_after.h index 6c812b89..eee6e826 100644 --- a/src/actions/skip_after.h +++ b/src/actions/skip_after.h @@ -18,6 +18,7 @@ #include #include "modsecurity/actions/action.h" +#include "src/actions/action_with_execution.h" #ifndef SRC_ACTIONS_SKIP_AFTER_H_ @@ -28,14 +29,14 @@ namespace modsecurity { namespace actions { -class SkipAfter : public Action { +class SkipAfter : public ActionWithExecution { public: explicit SkipAfter(const std::string &action) : Action(action), m_skipName(std::make_shared(m_parserPayload)) { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; private: // FIXME: This should be a regular pointer instead of a shared pointer. diff --git a/src/actions/tag.cc b/src/actions/tag.cc index 0ec22abb..a880d483 100644 --- a/src/actions/tag.cc +++ b/src/actions/tag.cc @@ -52,7 +52,7 @@ namespace modsecurity { namespace actions { -bool Tag::execute(Transaction *transaction) noexcept { +bool Tag::execute(Transaction *transaction) const noexcept { ms_dbg_a(transaction, 9, "Rule tag: " + getTagName(transaction)); return true; } diff --git a/src/actions/tag.h b/src/actions/tag.h index 8ff9ebbc..e11605ac 100644 --- a/src/actions/tag.h +++ b/src/actions/tag.h @@ -21,6 +21,8 @@ #include "modsecurity/actions/action.h" #include "src/actions/action_with_run_time_string.h" #include "src/actions/action_allowed_in_sec_default_action.h" +#include "src/actions/action_with_execution.h" + #ifndef SRC_ACTIONS_TAG_H_ #define SRC_ACTIONS_TAG_H_ @@ -31,7 +33,7 @@ namespace actions { class Tag : public ActionWithRunTimeString, - public ActionAllowedAsSecDefaultAction { + public ActionAllowedAsSecDefaultAction, public ActionWithExecution { public: explicit Tag(std::unique_ptr runTimeString) : ActionWithRunTimeString(std::move(runTimeString)), @@ -43,7 +45,7 @@ class Tag : public ActionWithRunTimeString, Action(action) { } - bool execute(Transaction *transaction) noexcept override; + bool execute(Transaction *transaction) const noexcept override; inline std::string getTagName(Transaction *transaction) const { return getEvaluatedRunTimeString(transaction); diff --git a/src/parser/seclang-parser.cc b/src/parser/seclang-parser.cc index 067401df..bdc59656 100644 --- a/src/parser/seclang-parser.cc +++ b/src/parser/seclang-parser.cc @@ -42,7 +42,7 @@ // Unqualified %code blocks. -#line 328 "seclang-parser.yy" +#line 329 "seclang-parser.yy" #include "src/parser/driver.h" @@ -1318,7 +1318,7 @@ namespace yy { // User initialization code. -#line 321 "seclang-parser.yy" +#line 322 "seclang-parser.yy" { // Initialize the initial location. yyla.location.begin.filename = yyla.location.end.filename = new std::string(driver.file); @@ -1690,7 +1690,7 @@ namespace yy { switch (yyn) { case 2: // input: "end of file" -#line 715 "seclang-parser.yy" +#line 716 "seclang-parser.yy" { return 0; } @@ -1698,7 +1698,7 @@ namespace yy { break; case 6: // audit_log: "CONFIG_DIR_AUDIT_DIR_MOD" -#line 728 "seclang-parser.yy" +#line 729 "seclang-parser.yy" { driver.m_auditLog->setStorageDirMode(strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 8)); } @@ -1706,7 +1706,7 @@ namespace yy { break; case 7: // audit_log: "CONFIG_DIR_AUDIT_DIR" -#line 734 "seclang-parser.yy" +#line 735 "seclang-parser.yy" { driver.m_auditLog->setStorageDir(yystack_[0].value.as < std::string > ()); } @@ -1714,7 +1714,7 @@ namespace yy { break; case 8: // audit_log: "CONFIG_DIR_AUDIT_ENG" "CONFIG_VALUE_RELEVANT_ONLY" -#line 740 "seclang-parser.yy" +#line 741 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::RelevantOnlyAuditLogStatus); } @@ -1722,7 +1722,7 @@ namespace yy { break; case 9: // audit_log: "CONFIG_DIR_AUDIT_ENG" "CONFIG_VALUE_OFF" -#line 744 "seclang-parser.yy" +#line 745 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::OffAuditLogStatus); } @@ -1730,7 +1730,7 @@ namespace yy { break; case 10: // audit_log: "CONFIG_DIR_AUDIT_ENG" "CONFIG_VALUE_ON" -#line 748 "seclang-parser.yy" +#line 749 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::OnAuditLogStatus); } @@ -1738,7 +1738,7 @@ namespace yy { break; case 11: // audit_log: "CONFIG_DIR_AUDIT_FLE_MOD" -#line 754 "seclang-parser.yy" +#line 755 "seclang-parser.yy" { driver.m_auditLog->setFileMode(strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 8)); } @@ -1746,7 +1746,7 @@ namespace yy { break; case 12: // audit_log: "CONFIG_DIR_AUDIT_LOG2" -#line 760 "seclang-parser.yy" +#line 761 "seclang-parser.yy" { driver.m_auditLog->setFilePath2(yystack_[0].value.as < std::string > ()); } @@ -1754,7 +1754,7 @@ namespace yy { break; case 13: // audit_log: "CONFIG_DIR_AUDIT_LOG_P" -#line 766 "seclang-parser.yy" +#line 767 "seclang-parser.yy" { driver.m_auditLog->setParts(yystack_[0].value.as < std::string > ()); } @@ -1762,7 +1762,7 @@ namespace yy { break; case 14: // audit_log: "CONFIG_DIR_AUDIT_LOG" -#line 772 "seclang-parser.yy" +#line 773 "seclang-parser.yy" { driver.m_auditLog->setFilePath1(yystack_[0].value.as < std::string > ()); } @@ -1770,7 +1770,7 @@ namespace yy { break; case 15: // audit_log: CONFIG_DIR_AUDIT_LOG_FMT JSON -#line 777 "seclang-parser.yy" +#line 778 "seclang-parser.yy" { driver.m_auditLog->setFormat(modsecurity::audit_log::AuditLog::JSONAuditLogFormat); } @@ -1778,7 +1778,7 @@ namespace yy { break; case 16: // audit_log: CONFIG_DIR_AUDIT_LOG_FMT NATIVE -#line 782 "seclang-parser.yy" +#line 783 "seclang-parser.yy" { driver.m_auditLog->setFormat(modsecurity::audit_log::AuditLog::NativeAuditLogFormat); } @@ -1786,7 +1786,7 @@ namespace yy { break; case 17: // audit_log: "CONFIG_DIR_AUDIT_STS" -#line 788 "seclang-parser.yy" +#line 789 "seclang-parser.yy" { std::string relevant_status(yystack_[0].value.as < std::string > ()); driver.m_auditLog->setRelevantStatus(relevant_status); @@ -1795,7 +1795,7 @@ namespace yy { break; case 18: // audit_log: "CONFIG_DIR_AUDIT_TPE" "CONFIG_VALUE_SERIAL" -#line 795 "seclang-parser.yy" +#line 796 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::SerialAuditLogType); } @@ -1803,7 +1803,7 @@ namespace yy { break; case 19: // audit_log: "CONFIG_DIR_AUDIT_TPE" "CONFIG_VALUE_PARALLEL" -#line 799 "seclang-parser.yy" +#line 800 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::ParallelAuditLogType); } @@ -1811,7 +1811,7 @@ namespace yy { break; case 20: // audit_log: "CONFIG_DIR_AUDIT_TPE" "CONFIG_VALUE_HTTPS" -#line 803 "seclang-parser.yy" +#line 804 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::HttpsAuditLogType); } @@ -1819,7 +1819,7 @@ namespace yy { break; case 21: // audit_log: "CONFIG_UPDLOAD_KEEP_FILES" "CONFIG_VALUE_ON" -#line 809 "seclang-parser.yy" +#line 810 "seclang-parser.yy" { driver.m_uploadKeepFiles = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -1827,7 +1827,7 @@ namespace yy { break; case 22: // audit_log: "CONFIG_UPDLOAD_KEEP_FILES" "CONFIG_VALUE_OFF" -#line 813 "seclang-parser.yy" +#line 814 "seclang-parser.yy" { driver.m_uploadKeepFiles = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -1835,7 +1835,7 @@ namespace yy { break; case 23: // audit_log: "CONFIG_UPDLOAD_KEEP_FILES" "CONFIG_VALUE_RELEVANT_ONLY" -#line 817 "seclang-parser.yy" +#line 818 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecUploadKeepFiles RelevantOnly is not currently supported. Accepted values are On or Off"); YYERROR; @@ -1844,7 +1844,7 @@ namespace yy { break; case 24: // audit_log: "CONFIG_UPLOAD_FILE_LIMIT" -#line 822 "seclang-parser.yy" +#line 823 "seclang-parser.yy" { driver.m_uploadFileLimit.m_set = true; driver.m_uploadFileLimit.m_value = strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 10); @@ -1853,7 +1853,7 @@ namespace yy { break; case 25: // audit_log: "CONFIG_UPLOAD_FILE_MODE" -#line 827 "seclang-parser.yy" +#line 828 "seclang-parser.yy" { driver.m_uploadFileMode.m_set = true; driver.m_uploadFileMode.m_value = strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 8); @@ -1862,7 +1862,7 @@ namespace yy { break; case 26: // audit_log: "CONFIG_UPLOAD_DIR" -#line 832 "seclang-parser.yy" +#line 833 "seclang-parser.yy" { driver.m_uploadDirectory.m_set = true; driver.m_uploadDirectory.m_value = yystack_[0].value.as < std::string > (); @@ -1871,7 +1871,7 @@ namespace yy { break; case 27: // audit_log: "CONFIG_UPDLOAD_SAVE_TMP_FILES" "CONFIG_VALUE_ON" -#line 837 "seclang-parser.yy" +#line 838 "seclang-parser.yy" { driver.m_tmpSaveUploadedFiles = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -1879,7 +1879,7 @@ namespace yy { break; case 28: // audit_log: "CONFIG_UPDLOAD_SAVE_TMP_FILES" "CONFIG_VALUE_OFF" -#line 841 "seclang-parser.yy" +#line 842 "seclang-parser.yy" { driver.m_tmpSaveUploadedFiles = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -1887,7 +1887,7 @@ namespace yy { break; case 29: // actions: "QUOTATION_MARK" actions_may_quoted "QUOTATION_MARK" -#line 848 "seclang-parser.yy" +#line 849 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[1].value.as < std::unique_ptr > > > ()); } @@ -1895,7 +1895,7 @@ namespace yy { break; case 30: // actions: actions_may_quoted -#line 852 "seclang-parser.yy" +#line 853 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); } @@ -1903,7 +1903,7 @@ namespace yy { break; case 31: // actions_may_quoted: actions_may_quoted "," act -#line 859 "seclang-parser.yy" +#line 860 "seclang-parser.yy" { ACTION_INIT(yystack_[0].value.as < std::unique_ptr > (), yystack_[3].location) yystack_[2].value.as < std::unique_ptr > > > ()->push_back(std::move(yystack_[0].value.as < std::unique_ptr > ())); @@ -1913,7 +1913,7 @@ namespace yy { break; case 32: // actions_may_quoted: act -#line 865 "seclang-parser.yy" +#line 866 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); ACTION_INIT(yystack_[0].value.as < std::unique_ptr > (), yystack_[1].location) @@ -1924,7 +1924,7 @@ namespace yy { break; case 33: // op: op_before_init -#line 875 "seclang-parser.yy" +#line 876 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > () = std::move(yystack_[0].value.as < std::unique_ptr > ()); std::string error; @@ -1937,7 +1937,7 @@ namespace yy { break; case 34: // op: "NOT" op_before_init -#line 884 "seclang-parser.yy" +#line 885 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > () = std::move(yystack_[0].value.as < std::unique_ptr > ()); yylhs.value.as < std::unique_ptr > ()->m_negation = true; @@ -1951,7 +1951,7 @@ namespace yy { break; case 35: // op: run_time_string -#line 894 "seclang-parser.yy" +#line 895 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rx(std::move(yystack_[0].value.as < std::unique_ptr > ()))); std::string error; @@ -1964,7 +1964,7 @@ namespace yy { break; case 36: // op: "NOT" run_time_string -#line 903 "seclang-parser.yy" +#line 904 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rx(std::move(yystack_[0].value.as < std::unique_ptr > ()))); yylhs.value.as < std::unique_ptr > ()->m_negation = true; @@ -1978,7 +1978,7 @@ namespace yy { break; case 37: // op_before_init: "OPERATOR_UNCONDITIONAL_MATCH" -#line 916 "seclang-parser.yy" +#line 917 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::UnconditionalMatch()); } @@ -1986,7 +1986,7 @@ namespace yy { break; case 38: // op_before_init: "OPERATOR_DETECT_SQLI" -#line 920 "seclang-parser.yy" +#line 921 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::DetectSQLi()); } @@ -1994,7 +1994,7 @@ namespace yy { break; case 39: // op_before_init: "OPERATOR_DETECT_XSS" -#line 924 "seclang-parser.yy" +#line 925 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::DetectXSS()); } @@ -2002,7 +2002,7 @@ namespace yy { break; case 40: // op_before_init: "OPERATOR_VALIDATE_URL_ENCODING" -#line 928 "seclang-parser.yy" +#line 929 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateUrlEncoding()); } @@ -2010,7 +2010,7 @@ namespace yy { break; case 41: // op_before_init: "OPERATOR_VALIDATE_UTF8_ENCODING" -#line 932 "seclang-parser.yy" +#line 933 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateUtf8Encoding()); } @@ -2018,7 +2018,7 @@ namespace yy { break; case 42: // op_before_init: "OPERATOR_INSPECT_FILE" run_time_string -#line 936 "seclang-parser.yy" +#line 937 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::InspectFile(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2026,7 +2026,7 @@ namespace yy { break; case 43: // op_before_init: "OPERATOR_FUZZY_HASH" run_time_string -#line 940 "seclang-parser.yy" +#line 941 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::FuzzyHash(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2034,7 +2034,7 @@ namespace yy { break; case 44: // op_before_init: "OPERATOR_VALIDATE_BYTE_RANGE" run_time_string -#line 944 "seclang-parser.yy" +#line 945 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateByteRange(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2042,7 +2042,7 @@ namespace yy { break; case 45: // op_before_init: "OPERATOR_VALIDATE_DTD" run_time_string -#line 948 "seclang-parser.yy" +#line 949 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateDTD(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2050,7 +2050,7 @@ namespace yy { break; case 46: // op_before_init: "OPERATOR_VALIDATE_HASH" run_time_string -#line 952 "seclang-parser.yy" +#line 953 "seclang-parser.yy" { /* $$ = new operators::ValidateHash($1); */ OPERATOR_NOT_SUPPORTED("ValidateHash", yystack_[2].location); @@ -2059,7 +2059,7 @@ namespace yy { break; case 47: // op_before_init: "OPERATOR_VALIDATE_SCHEMA" run_time_string -#line 957 "seclang-parser.yy" +#line 958 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateSchema(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2067,7 +2067,7 @@ namespace yy { break; case 48: // op_before_init: "OPERATOR_VERIFY_CC" run_time_string -#line 961 "seclang-parser.yy" +#line 962 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifyCC(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2075,7 +2075,7 @@ namespace yy { break; case 49: // op_before_init: "OPERATOR_VERIFY_CPF" run_time_string -#line 965 "seclang-parser.yy" +#line 966 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifyCPF(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2083,7 +2083,7 @@ namespace yy { break; case 50: // op_before_init: "OPERATOR_VERIFY_SSN" run_time_string -#line 969 "seclang-parser.yy" +#line 970 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifySSN(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2091,7 +2091,7 @@ namespace yy { break; case 51: // op_before_init: "OPERATOR_VERIFY_SVNR" run_time_string -#line 973 "seclang-parser.yy" +#line 974 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifySVNR(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2099,7 +2099,7 @@ namespace yy { break; case 52: // op_before_init: "OPERATOR_GSB_LOOKUP" run_time_string -#line 977 "seclang-parser.yy" +#line 978 "seclang-parser.yy" { /* $$ = new operators::GsbLookup($1); */ OPERATOR_NOT_SUPPORTED("GsbLookup", yystack_[2].location); @@ -2108,7 +2108,7 @@ namespace yy { break; case 53: // op_before_init: "OPERATOR_RSUB" run_time_string -#line 982 "seclang-parser.yy" +#line 983 "seclang-parser.yy" { /* $$ = new operators::Rsub($1); */ OPERATOR_NOT_SUPPORTED("Rsub", yystack_[2].location); @@ -2117,7 +2117,7 @@ namespace yy { break; case 54: // op_before_init: "OPERATOR_WITHIN" run_time_string -#line 987 "seclang-parser.yy" +#line 988 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Within(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2125,7 +2125,7 @@ namespace yy { break; case 55: // op_before_init: "OPERATOR_CONTAINS_WORD" run_time_string -#line 991 "seclang-parser.yy" +#line 992 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ContainsWord(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2133,7 +2133,7 @@ namespace yy { break; case 56: // op_before_init: "OPERATOR_CONTAINS" run_time_string -#line 995 "seclang-parser.yy" +#line 996 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Contains(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2141,7 +2141,7 @@ namespace yy { break; case 57: // op_before_init: "OPERATOR_ENDS_WITH" run_time_string -#line 999 "seclang-parser.yy" +#line 1000 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::EndsWith(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2149,7 +2149,7 @@ namespace yy { break; case 58: // op_before_init: "OPERATOR_EQ" run_time_string -#line 1003 "seclang-parser.yy" +#line 1004 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Eq(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2157,7 +2157,7 @@ namespace yy { break; case 59: // op_before_init: "OPERATOR_GE" run_time_string -#line 1007 "seclang-parser.yy" +#line 1008 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Ge(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2165,7 +2165,7 @@ namespace yy { break; case 60: // op_before_init: "OPERATOR_GT" run_time_string -#line 1011 "seclang-parser.yy" +#line 1012 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Gt(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2173,7 +2173,7 @@ namespace yy { break; case 61: // op_before_init: "OPERATOR_IP_MATCH_FROM_FILE" run_time_string -#line 1015 "seclang-parser.yy" +#line 1016 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::IpMatchF(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2181,7 +2181,7 @@ namespace yy { break; case 62: // op_before_init: "OPERATOR_IP_MATCH" run_time_string -#line 1019 "seclang-parser.yy" +#line 1020 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::IpMatch(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2189,7 +2189,7 @@ namespace yy { break; case 63: // op_before_init: "OPERATOR_LE" run_time_string -#line 1023 "seclang-parser.yy" +#line 1024 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Le(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2197,7 +2197,7 @@ namespace yy { break; case 64: // op_before_init: "OPERATOR_LT" run_time_string -#line 1027 "seclang-parser.yy" +#line 1028 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Lt(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2205,7 +2205,7 @@ namespace yy { break; case 65: // op_before_init: "OPERATOR_PM_FROM_FILE" run_time_string -#line 1031 "seclang-parser.yy" +#line 1032 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::PmFromFile(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2213,7 +2213,7 @@ namespace yy { break; case 66: // op_before_init: "OPERATOR_PM" run_time_string -#line 1035 "seclang-parser.yy" +#line 1036 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Pm(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2221,7 +2221,7 @@ namespace yy { break; case 67: // op_before_init: "OPERATOR_RBL" run_time_string -#line 1039 "seclang-parser.yy" +#line 1040 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rbl(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2229,7 +2229,7 @@ namespace yy { break; case 68: // op_before_init: "OPERATOR_RX" run_time_string -#line 1043 "seclang-parser.yy" +#line 1044 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rx(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2237,7 +2237,7 @@ namespace yy { break; case 69: // op_before_init: "OPERATOR_RX_GLOBAL" run_time_string -#line 1047 "seclang-parser.yy" +#line 1048 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::RxGlobal(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2245,7 +2245,7 @@ namespace yy { break; case 70: // op_before_init: "OPERATOR_STR_EQ" run_time_string -#line 1051 "seclang-parser.yy" +#line 1052 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::StrEq(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2253,7 +2253,7 @@ namespace yy { break; case 71: // op_before_init: "OPERATOR_STR_MATCH" run_time_string -#line 1055 "seclang-parser.yy" +#line 1056 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::StrMatch(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2261,7 +2261,7 @@ namespace yy { break; case 72: // op_before_init: "OPERATOR_BEGINS_WITH" run_time_string -#line 1059 "seclang-parser.yy" +#line 1060 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::BeginsWith(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2269,7 +2269,7 @@ namespace yy { break; case 73: // op_before_init: "OPERATOR_GEOLOOKUP" -#line 1063 "seclang-parser.yy" +#line 1064 "seclang-parser.yy" { #if defined(WITH_GEOIP) or defined(WITH_MAXMIND) OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::GeoLookup()); @@ -2284,7 +2284,7 @@ namespace yy { break; case 75: // expression: "DIRECTIVE" variables op actions -#line 1078 "seclang-parser.yy" +#line 1079 "seclang-parser.yy" { std::vector *a = new std::vector(); std::vector > *t = new std::vector >(); @@ -2320,7 +2320,7 @@ namespace yy { break; case 76: // expression: "DIRECTIVE" variables op -#line 1110 "seclang-parser.yy" +#line 1111 "seclang-parser.yy" { variables::Variables *v = new variables::Variables(); for (auto &i : *yystack_[1].value.as < std::unique_ptr > > > ().get()) { @@ -2343,7 +2343,7 @@ namespace yy { break; case 77: // expression: "CONFIG_DIR_SEC_ACTION" actions -#line 1129 "seclang-parser.yy" +#line 1130 "seclang-parser.yy" { std::vector *a = new std::vector(); std::vector > *t = new std::vector >(); @@ -2368,7 +2368,7 @@ namespace yy { break; case 78: // expression: "DIRECTIVE_SECRULESCRIPT" actions -#line 1150 "seclang-parser.yy" +#line 1151 "seclang-parser.yy" { std::string err; std::vector *a = new std::vector(); @@ -2402,7 +2402,7 @@ namespace yy { break; case 79: // expression: "CONFIG_DIR_SEC_DEFAULT_ACTION" actions -#line 1180 "seclang-parser.yy" +#line 1181 "seclang-parser.yy" { bool hasDisruptive = false; std::vector *actions = new std::vector(); @@ -2464,7 +2464,7 @@ namespace yy { break; case 80: // expression: "CONFIG_DIR_SEC_MARKER" -#line 1238 "seclang-parser.yy" +#line 1239 "seclang-parser.yy" { driver.addSecMarker(modsecurity::utils::string::removeBracketsIfNeeded(yystack_[0].value.as < std::string > ()), /* file name */ std::unique_ptr(new std::string(*yystack_[0].location.end.filename)), @@ -2475,7 +2475,7 @@ namespace yy { break; case 81: // expression: "CONFIG_DIR_RULE_ENG" "CONFIG_VALUE_OFF" -#line 1245 "seclang-parser.yy" +#line 1246 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::DisabledRuleEngine; } @@ -2483,7 +2483,7 @@ namespace yy { break; case 82: // expression: "CONFIG_DIR_RULE_ENG" "CONFIG_VALUE_ON" -#line 1249 "seclang-parser.yy" +#line 1250 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::EnabledRuleEngine; } @@ -2491,7 +2491,7 @@ namespace yy { break; case 83: // expression: "CONFIG_DIR_RULE_ENG" "CONFIG_VALUE_DETC" -#line 1253 "seclang-parser.yy" +#line 1254 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::DetectionOnlyRuleEngine; } @@ -2499,7 +2499,7 @@ namespace yy { break; case 84: // expression: "CONFIG_DIR_REQ_BODY" "CONFIG_VALUE_ON" -#line 1257 "seclang-parser.yy" +#line 1258 "seclang-parser.yy" { driver.m_secRequestBodyAccess = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -2507,7 +2507,7 @@ namespace yy { break; case 85: // expression: "CONFIG_DIR_REQ_BODY" "CONFIG_VALUE_OFF" -#line 1261 "seclang-parser.yy" +#line 1262 "seclang-parser.yy" { driver.m_secRequestBodyAccess = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -2515,7 +2515,7 @@ namespace yy { break; case 86: // expression: "CONFIG_DIR_RES_BODY" "CONFIG_VALUE_ON" -#line 1265 "seclang-parser.yy" +#line 1266 "seclang-parser.yy" { driver.m_secResponseBodyAccess = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -2523,7 +2523,7 @@ namespace yy { break; case 87: // expression: "CONFIG_DIR_RES_BODY" "CONFIG_VALUE_OFF" -#line 1269 "seclang-parser.yy" +#line 1270 "seclang-parser.yy" { driver.m_secResponseBodyAccess = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -2531,7 +2531,7 @@ namespace yy { break; case 88: // expression: "CONFIG_SEC_ARGUMENT_SEPARATOR" -#line 1273 "seclang-parser.yy" +#line 1274 "seclang-parser.yy" { if (yystack_[0].value.as < std::string > ().length() != 1) { driver.error(yystack_[1].location, "Argument separator should be set to a single character."); @@ -2544,7 +2544,7 @@ namespace yy { break; case 89: // expression: "CONFIG_COMPONENT_SIG" -#line 1282 "seclang-parser.yy" +#line 1283 "seclang-parser.yy" { driver.m_components.push_back(yystack_[0].value.as < std::string > ()); } @@ -2552,7 +2552,7 @@ namespace yy { break; case 90: // expression: "CONFIG_CONN_ENGINE" "CONFIG_VALUE_ON" -#line 1286 "seclang-parser.yy" +#line 1287 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecConnEngine is not yet supported."); YYERROR; @@ -2561,14 +2561,14 @@ namespace yy { break; case 91: // expression: "CONFIG_CONN_ENGINE" "CONFIG_VALUE_OFF" -#line 1291 "seclang-parser.yy" +#line 1292 "seclang-parser.yy" { } #line 2568 "seclang-parser.cc" break; case 92: // expression: "CONFIG_SEC_WEB_APP_ID" -#line 1294 "seclang-parser.yy" +#line 1295 "seclang-parser.yy" { driver.m_secWebAppId.m_value = yystack_[0].value.as < std::string > (); driver.m_secWebAppId.m_set = true; @@ -2577,7 +2577,7 @@ namespace yy { break; case 93: // expression: "CONFIG_SEC_SERVER_SIG" -#line 1299 "seclang-parser.yy" +#line 1300 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecServerSignature is not supported."); YYERROR; @@ -2586,7 +2586,7 @@ namespace yy { break; case 94: // expression: "CONFIG_SEC_CACHE_TRANSFORMATIONS" -#line 1304 "seclang-parser.yy" +#line 1305 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecCacheTransformations is not supported."); YYERROR; @@ -2595,7 +2595,7 @@ namespace yy { break; case 95: // expression: "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" "CONFIG_VALUE_ON" -#line 1309 "seclang-parser.yy" +#line 1310 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecDisableBackendCompression is not supported."); YYERROR; @@ -2604,14 +2604,14 @@ namespace yy { break; case 96: // expression: "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" "CONFIG_VALUE_OFF" -#line 1314 "seclang-parser.yy" +#line 1315 "seclang-parser.yy" { } #line 2611 "seclang-parser.cc" break; case 97: // expression: "CONFIG_CONTENT_INJECTION" "CONFIG_VALUE_ON" -#line 1317 "seclang-parser.yy" +#line 1318 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecContentInjection is not yet supported."); YYERROR; @@ -2620,14 +2620,14 @@ namespace yy { break; case 98: // expression: "CONFIG_CONTENT_INJECTION" "CONFIG_VALUE_OFF" -#line 1322 "seclang-parser.yy" +#line 1323 "seclang-parser.yy" { } #line 2627 "seclang-parser.cc" break; case 99: // expression: "CONFIG_SEC_CHROOT_DIR" -#line 1325 "seclang-parser.yy" +#line 1326 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecChrootDir is not supported."); YYERROR; @@ -2636,7 +2636,7 @@ namespace yy { break; case 100: // expression: "CONFIG_SEC_HASH_ENGINE" "CONFIG_VALUE_ON" -#line 1330 "seclang-parser.yy" +#line 1331 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecHashEngine is not yet supported."); YYERROR; @@ -2645,14 +2645,14 @@ namespace yy { break; case 101: // expression: "CONFIG_SEC_HASH_ENGINE" "CONFIG_VALUE_OFF" -#line 1335 "seclang-parser.yy" +#line 1336 "seclang-parser.yy" { } #line 2652 "seclang-parser.cc" break; case 102: // expression: "CONFIG_SEC_HASH_KEY" -#line 1338 "seclang-parser.yy" +#line 1339 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashKey is not yet supported."); YYERROR; @@ -2661,7 +2661,7 @@ namespace yy { break; case 103: // expression: "CONFIG_SEC_HASH_PARAM" -#line 1343 "seclang-parser.yy" +#line 1344 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashParam is not yet supported."); YYERROR; @@ -2670,7 +2670,7 @@ namespace yy { break; case 104: // expression: "CONFIG_SEC_HASH_METHOD_RX" -#line 1348 "seclang-parser.yy" +#line 1349 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashMethodRx is not yet supported."); YYERROR; @@ -2679,7 +2679,7 @@ namespace yy { break; case 105: // expression: "CONFIG_SEC_HASH_METHOD_PM" -#line 1353 "seclang-parser.yy" +#line 1354 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashMethodPm is not yet supported."); YYERROR; @@ -2688,7 +2688,7 @@ namespace yy { break; case 106: // expression: "CONFIG_DIR_GSB_DB" -#line 1358 "seclang-parser.yy" +#line 1359 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecGsbLookupDb is not supported."); YYERROR; @@ -2697,7 +2697,7 @@ namespace yy { break; case 107: // expression: "CONFIG_SEC_GUARDIAN_LOG" -#line 1363 "seclang-parser.yy" +#line 1364 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecGuardianLog is not supported."); YYERROR; @@ -2706,7 +2706,7 @@ namespace yy { break; case 108: // expression: "CONFIG_SEC_INTERCEPT_ON_ERROR" "CONFIG_VALUE_ON" -#line 1368 "seclang-parser.yy" +#line 1369 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecInterceptOnError is not yet supported."); YYERROR; @@ -2715,14 +2715,14 @@ namespace yy { break; case 109: // expression: "CONFIG_SEC_INTERCEPT_ON_ERROR" "CONFIG_VALUE_OFF" -#line 1373 "seclang-parser.yy" +#line 1374 "seclang-parser.yy" { } #line 2722 "seclang-parser.cc" break; case 110: // expression: "CONFIG_SEC_CONN_R_STATE_LIMIT" -#line 1376 "seclang-parser.yy" +#line 1377 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecConnReadStateLimit is not yet supported."); YYERROR; @@ -2731,7 +2731,7 @@ namespace yy { break; case 111: // expression: "CONFIG_SEC_CONN_W_STATE_LIMIT" -#line 1381 "seclang-parser.yy" +#line 1382 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecConnWriteStateLimit is not yet supported."); YYERROR; @@ -2740,7 +2740,7 @@ namespace yy { break; case 112: // expression: "CONFIG_SEC_SENSOR_ID" -#line 1386 "seclang-parser.yy" +#line 1387 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecSensorId is not yet supported."); YYERROR; @@ -2749,7 +2749,7 @@ namespace yy { break; case 113: // expression: "CONFIG_SEC_RULE_INHERITANCE" "CONFIG_VALUE_ON" -#line 1391 "seclang-parser.yy" +#line 1392 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecRuleInheritance is not yet supported."); YYERROR; @@ -2758,14 +2758,14 @@ namespace yy { break; case 114: // expression: "CONFIG_SEC_RULE_INHERITANCE" "CONFIG_VALUE_OFF" -#line 1396 "seclang-parser.yy" +#line 1397 "seclang-parser.yy" { } #line 2765 "seclang-parser.cc" break; case 115: // expression: "CONFIG_SEC_RULE_PERF_TIME" -#line 1399 "seclang-parser.yy" +#line 1400 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecRulePerfTime is not yet supported."); YYERROR; @@ -2774,7 +2774,7 @@ namespace yy { break; case 116: // expression: "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" -#line 1404 "seclang-parser.yy" +#line 1405 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecStreamInBodyInspection is not supported."); YYERROR; @@ -2783,7 +2783,7 @@ namespace yy { break; case 117: // expression: "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" -#line 1409 "seclang-parser.yy" +#line 1410 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecStreamOutBodyInspection is not supported."); YYERROR; @@ -2792,7 +2792,7 @@ namespace yy { break; case 118: // expression: "CONFIG_SEC_RULE_REMOVE_BY_ID" -#line 1414 "seclang-parser.yy" +#line 1415 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.load(yystack_[0].value.as < std::string > (), &error) == false) { @@ -2809,7 +2809,7 @@ namespace yy { break; case 119: // expression: "CONFIG_SEC_RULE_REMOVE_BY_TAG" -#line 1427 "seclang-parser.yy" +#line 1428 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadRemoveRuleByTag(yystack_[0].value.as < std::string > (), &error) == false) { @@ -2826,7 +2826,7 @@ namespace yy { break; case 120: // expression: "CONFIG_SEC_RULE_REMOVE_BY_MSG" -#line 1440 "seclang-parser.yy" +#line 1441 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadRemoveRuleByMsg(yystack_[0].value.as < std::string > (), &error) == false) { @@ -2843,7 +2843,7 @@ namespace yy { break; case 121: // expression: "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" variables_pre_process -#line 1453 "seclang-parser.yy" +#line 1454 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadUpdateTargetByTag(yystack_[1].value.as < std::string > (), std::move(yystack_[0].value.as < std::unique_ptr > > > ()), &error) == false) { @@ -2860,7 +2860,7 @@ namespace yy { break; case 122: // expression: "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" variables_pre_process -#line 1466 "seclang-parser.yy" +#line 1467 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadUpdateTargetByMsg(yystack_[1].value.as < std::string > (), std::move(yystack_[0].value.as < std::unique_ptr > > > ()), &error) == false) { @@ -2877,7 +2877,7 @@ namespace yy { break; case 123: // expression: "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" variables_pre_process -#line 1479 "seclang-parser.yy" +#line 1480 "seclang-parser.yy" { std::string error; double ruleId; @@ -2907,7 +2907,7 @@ namespace yy { break; case 124: // expression: "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" actions -#line 1505 "seclang-parser.yy" +#line 1506 "seclang-parser.yy" { std::string error; double ruleId; @@ -2938,7 +2938,7 @@ namespace yy { break; case 125: // expression: "CONFIG_DIR_DEBUG_LVL" -#line 1533 "seclang-parser.yy" +#line 1534 "seclang-parser.yy" { if (driver.m_debugLog != NULL) { driver.m_debugLog->setDebugLogLevel(atoi(yystack_[0].value.as < std::string > ().c_str())); @@ -2954,7 +2954,7 @@ namespace yy { break; case 126: // expression: "CONFIG_DIR_DEBUG_LOG" -#line 1545 "seclang-parser.yy" +#line 1546 "seclang-parser.yy" { if (driver.m_debugLog != NULL) { std::string error; @@ -2977,7 +2977,7 @@ namespace yy { break; case 127: // expression: "CONFIG_DIR_GEO_DB" -#line 1565 "seclang-parser.yy" +#line 1566 "seclang-parser.yy" { #if defined(WITH_GEOIP) or defined(WITH_MAXMIND) std::string err; @@ -3008,7 +3008,7 @@ namespace yy { break; case 128: // expression: "CONFIG_DIR_ARGS_LIMIT" -#line 1592 "seclang-parser.yy" +#line 1593 "seclang-parser.yy" { driver.m_argumentsLimit.m_set = true; driver.m_argumentsLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3017,7 +3017,7 @@ namespace yy { break; case 129: // expression: "CONFIG_DIR_REQ_BODY_LIMIT" -#line 1598 "seclang-parser.yy" +#line 1599 "seclang-parser.yy" { driver.m_requestBodyLimit.m_set = true; driver.m_requestBodyLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3026,7 +3026,7 @@ namespace yy { break; case 130: // expression: "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" -#line 1603 "seclang-parser.yy" +#line 1604 "seclang-parser.yy" { driver.m_requestBodyNoFilesLimit.m_set = true; driver.m_requestBodyNoFilesLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3035,7 +3035,7 @@ namespace yy { break; case 131: // expression: "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" -#line 1608 "seclang-parser.yy" +#line 1609 "seclang-parser.yy" { std::stringstream ss; ss << "As of ModSecurity version 3.0, SecRequestBodyInMemoryLimit is no longer "; @@ -3048,7 +3048,7 @@ namespace yy { break; case 132: // expression: "CONFIG_DIR_RES_BODY_LIMIT" -#line 1617 "seclang-parser.yy" +#line 1618 "seclang-parser.yy" { driver.m_responseBodyLimit.m_set = true; driver.m_responseBodyLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3057,7 +3057,7 @@ namespace yy { break; case 133: // expression: "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" "CONFIG_VALUE_PROCESS_PARTIAL" -#line 1622 "seclang-parser.yy" +#line 1623 "seclang-parser.yy" { driver.m_requestBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction; } @@ -3065,7 +3065,7 @@ namespace yy { break; case 134: // expression: "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" "CONFIG_VALUE_REJECT" -#line 1626 "seclang-parser.yy" +#line 1627 "seclang-parser.yy" { driver.m_requestBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::RejectBodyLimitAction; } @@ -3073,7 +3073,7 @@ namespace yy { break; case 135: // expression: "CONFIG_DIR_RES_BODY_LIMIT_ACTION" "CONFIG_VALUE_PROCESS_PARTIAL" -#line 1630 "seclang-parser.yy" +#line 1631 "seclang-parser.yy" { driver.m_responseBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction; } @@ -3081,7 +3081,7 @@ namespace yy { break; case 136: // expression: "CONFIG_DIR_RES_BODY_LIMIT_ACTION" "CONFIG_VALUE_REJECT" -#line 1634 "seclang-parser.yy" +#line 1635 "seclang-parser.yy" { driver.m_responseBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::RejectBodyLimitAction; } @@ -3089,7 +3089,7 @@ namespace yy { break; case 137: // expression: "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" "CONFIG_VALUE_ABORT" -#line 1638 "seclang-parser.yy" +#line 1639 "seclang-parser.yy" { driver.m_remoteRulesActionOnFailed = RulesSet::OnFailedRemoteRulesAction::AbortOnFailedRemoteRulesAction; } @@ -3097,7 +3097,7 @@ namespace yy { break; case 138: // expression: "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" "CONFIG_VALUE_WARN" -#line 1642 "seclang-parser.yy" +#line 1643 "seclang-parser.yy" { driver.m_remoteRulesActionOnFailed = RulesSet::OnFailedRemoteRulesAction::WarnOnFailedRemoteRulesAction; } @@ -3105,7 +3105,7 @@ namespace yy { break; case 141: // expression: "CONGIG_DIR_RESPONSE_BODY_MP" -#line 1656 "seclang-parser.yy" +#line 1657 "seclang-parser.yy" { std::istringstream buf(yystack_[0].value.as < std::string > ()); std::istream_iterator beg(buf), end; @@ -3121,7 +3121,7 @@ namespace yy { break; case 142: // expression: "CONGIG_DIR_RESPONSE_BODY_MP_CLEAR" -#line 1668 "seclang-parser.yy" +#line 1669 "seclang-parser.yy" { driver.m_responseBodyTypeToBeInspected.m_set = true; driver.m_responseBodyTypeToBeInspected.m_clear = true; @@ -3131,7 +3131,7 @@ namespace yy { break; case 143: // expression: "CONFIG_XML_EXTERNAL_ENTITY" "CONFIG_VALUE_OFF" -#line 1674 "seclang-parser.yy" +#line 1675 "seclang-parser.yy" { driver.m_secXMLExternalEntity = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -3139,7 +3139,7 @@ namespace yy { break; case 144: // expression: "CONFIG_XML_EXTERNAL_ENTITY" "CONFIG_VALUE_ON" -#line 1678 "seclang-parser.yy" +#line 1679 "seclang-parser.yy" { driver.m_secXMLExternalEntity = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -3147,7 +3147,7 @@ namespace yy { break; case 145: // expression: "CONGIG_DIR_SEC_TMP_DIR" -#line 1682 "seclang-parser.yy" +#line 1683 "seclang-parser.yy" { /* Parser error disabled to avoid breaking default installations with modsecurity.conf-recommended std::stringstream ss; @@ -3162,7 +3162,7 @@ namespace yy { break; case 148: // expression: "CONGIG_DIR_SEC_COOKIE_FORMAT" -#line 1703 "seclang-parser.yy" +#line 1704 "seclang-parser.yy" { if (atoi(yystack_[0].value.as < std::string > ().c_str()) == 1) { driver.error(yystack_[1].location, "SecCookieFormat 1 is not yet supported."); @@ -3173,7 +3173,7 @@ namespace yy { break; case 149: // expression: "CONFIG_SEC_COOKIEV0_SEPARATOR" -#line 1710 "seclang-parser.yy" +#line 1711 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecCookieV0Separator is not yet supported."); YYERROR; @@ -3182,7 +3182,7 @@ namespace yy { break; case 151: // expression: "CONFIG_DIR_UNICODE_MAP_FILE" -#line 1720 "seclang-parser.yy" +#line 1721 "seclang-parser.yy" { std::string error; std::vector param; @@ -3240,7 +3240,7 @@ namespace yy { break; case 152: // expression: "CONFIG_SEC_COLLECTION_TIMEOUT" -#line 1774 "seclang-parser.yy" +#line 1775 "seclang-parser.yy" { /* Parser error disabled to avoid breaking default CRS installations with crs-setup.conf-recommended driver.error(@0, "SecCollectionTimeout is not yet supported."); @@ -3251,7 +3251,7 @@ namespace yy { break; case 153: // expression: "CONFIG_SEC_HTTP_BLKEY" -#line 1781 "seclang-parser.yy" +#line 1782 "seclang-parser.yy" { driver.m_httpblKey.m_set = true; driver.m_httpblKey.m_value = yystack_[0].value.as < std::string > (); @@ -3260,7 +3260,7 @@ namespace yy { break; case 154: // variables: variables_pre_process -#line 1789 "seclang-parser.yy" +#line 1790 "seclang-parser.yy" { std::unique_ptr > > originalList = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); std::unique_ptr>> newList(new std::vector>()); @@ -3298,7 +3298,7 @@ namespace yy { break; case 155: // variables_pre_process: variables_may_be_quoted -#line 1826 "seclang-parser.yy" +#line 1827 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); } @@ -3306,7 +3306,7 @@ namespace yy { break; case 156: // variables_pre_process: "QUOTATION_MARK" variables_may_be_quoted "QUOTATION_MARK" -#line 1830 "seclang-parser.yy" +#line 1831 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[1].value.as < std::unique_ptr > > > ()); } @@ -3314,7 +3314,7 @@ namespace yy { break; case 157: // variables_may_be_quoted: variables_may_be_quoted PIPE var -#line 1837 "seclang-parser.yy" +#line 1838 "seclang-parser.yy" { yystack_[2].value.as < std::unique_ptr > > > ()->push_back(std::move(yystack_[0].value.as < std::unique_ptr > ())); yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[2].value.as < std::unique_ptr > > > ()); @@ -3323,7 +3323,7 @@ namespace yy { break; case 158: // variables_may_be_quoted: variables_may_be_quoted PIPE VAR_EXCLUSION var -#line 1842 "seclang-parser.yy" +#line 1843 "seclang-parser.yy" { std::unique_ptr c(new VariableModificatorExclusion(std::move(yystack_[0].value.as < std::unique_ptr > ()))); yystack_[3].value.as < std::unique_ptr > > > ()->push_back(std::move(c)); @@ -3333,7 +3333,7 @@ namespace yy { break; case 159: // variables_may_be_quoted: variables_may_be_quoted PIPE VAR_COUNT var -#line 1848 "seclang-parser.yy" +#line 1849 "seclang-parser.yy" { std::unique_ptr c(new VariableModificatorCount(std::move(yystack_[0].value.as < std::unique_ptr > ()))); yystack_[3].value.as < std::unique_ptr > > > ()->push_back(std::move(c)); @@ -3343,7 +3343,7 @@ namespace yy { break; case 160: // variables_may_be_quoted: var -#line 1854 "seclang-parser.yy" +#line 1855 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); b->push_back(std::move(yystack_[0].value.as < std::unique_ptr > ())); @@ -3353,7 +3353,7 @@ namespace yy { break; case 161: // variables_may_be_quoted: VAR_EXCLUSION var -#line 1860 "seclang-parser.yy" +#line 1861 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); std::unique_ptr c(new VariableModificatorExclusion(std::move(yystack_[0].value.as < std::unique_ptr > ()))); @@ -3364,7 +3364,7 @@ namespace yy { break; case 162: // variables_may_be_quoted: VAR_COUNT var -#line 1867 "seclang-parser.yy" +#line 1868 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); std::unique_ptr c(new VariableModificatorCount(std::move(yystack_[0].value.as < std::unique_ptr > ()))); @@ -3375,7 +3375,7 @@ namespace yy { break; case 163: // var: VARIABLE_ARGS "Dictionary element" -#line 1877 "seclang-parser.yy" +#line 1878 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3383,7 +3383,7 @@ namespace yy { break; case 164: // var: VARIABLE_ARGS "Dictionary element, selected by regexp" -#line 1881 "seclang-parser.yy" +#line 1882 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3391,7 +3391,7 @@ namespace yy { break; case 165: // var: VARIABLE_ARGS -#line 1885 "seclang-parser.yy" +#line 1886 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_NoDictElement()); } @@ -3399,7 +3399,7 @@ namespace yy { break; case 166: // var: VARIABLE_ARGS_POST "Dictionary element" -#line 1889 "seclang-parser.yy" +#line 1890 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3407,7 +3407,7 @@ namespace yy { break; case 167: // var: VARIABLE_ARGS_POST "Dictionary element, selected by regexp" -#line 1893 "seclang-parser.yy" +#line 1894 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3415,7 +3415,7 @@ namespace yy { break; case 168: // var: VARIABLE_ARGS_POST -#line 1897 "seclang-parser.yy" +#line 1898 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_NoDictElement()); } @@ -3423,7 +3423,7 @@ namespace yy { break; case 169: // var: VARIABLE_ARGS_GET "Dictionary element" -#line 1901 "seclang-parser.yy" +#line 1902 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3431,7 +3431,7 @@ namespace yy { break; case 170: // var: VARIABLE_ARGS_GET "Dictionary element, selected by regexp" -#line 1905 "seclang-parser.yy" +#line 1906 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3439,7 +3439,7 @@ namespace yy { break; case 171: // var: VARIABLE_ARGS_GET -#line 1909 "seclang-parser.yy" +#line 1910 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_NoDictElement()); } @@ -3447,7 +3447,7 @@ namespace yy { break; case 172: // var: VARIABLE_FILES_SIZES "Dictionary element" -#line 1913 "seclang-parser.yy" +#line 1914 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3455,7 +3455,7 @@ namespace yy { break; case 173: // var: VARIABLE_FILES_SIZES "Dictionary element, selected by regexp" -#line 1917 "seclang-parser.yy" +#line 1918 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3463,7 +3463,7 @@ namespace yy { break; case 174: // var: VARIABLE_FILES_SIZES -#line 1921 "seclang-parser.yy" +#line 1922 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_NoDictElement()); } @@ -3471,7 +3471,7 @@ namespace yy { break; case 175: // var: VARIABLE_FILES_NAMES "Dictionary element" -#line 1925 "seclang-parser.yy" +#line 1926 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3479,7 +3479,7 @@ namespace yy { break; case 176: // var: VARIABLE_FILES_NAMES "Dictionary element, selected by regexp" -#line 1929 "seclang-parser.yy" +#line 1930 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3487,7 +3487,7 @@ namespace yy { break; case 177: // var: VARIABLE_FILES_NAMES -#line 1933 "seclang-parser.yy" +#line 1934 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_NoDictElement()); } @@ -3495,7 +3495,7 @@ namespace yy { break; case 178: // var: VARIABLE_FILES_TMP_CONTENT "Dictionary element" -#line 1937 "seclang-parser.yy" +#line 1938 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3503,7 +3503,7 @@ namespace yy { break; case 179: // var: VARIABLE_FILES_TMP_CONTENT "Dictionary element, selected by regexp" -#line 1941 "seclang-parser.yy" +#line 1942 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3511,7 +3511,7 @@ namespace yy { break; case 180: // var: VARIABLE_FILES_TMP_CONTENT -#line 1945 "seclang-parser.yy" +#line 1946 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_NoDictElement()); } @@ -3519,7 +3519,7 @@ namespace yy { break; case 181: // var: VARIABLE_MULTIPART_FILENAME "Dictionary element" -#line 1949 "seclang-parser.yy" +#line 1950 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3527,7 +3527,7 @@ namespace yy { break; case 182: // var: VARIABLE_MULTIPART_FILENAME "Dictionary element, selected by regexp" -#line 1953 "seclang-parser.yy" +#line 1954 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3535,7 +3535,7 @@ namespace yy { break; case 183: // var: VARIABLE_MULTIPART_FILENAME -#line 1957 "seclang-parser.yy" +#line 1958 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_NoDictElement()); } @@ -3543,7 +3543,7 @@ namespace yy { break; case 184: // var: VARIABLE_MULTIPART_NAME "Dictionary element" -#line 1961 "seclang-parser.yy" +#line 1962 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3551,7 +3551,7 @@ namespace yy { break; case 185: // var: VARIABLE_MULTIPART_NAME "Dictionary element, selected by regexp" -#line 1965 "seclang-parser.yy" +#line 1966 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3559,7 +3559,7 @@ namespace yy { break; case 186: // var: VARIABLE_MULTIPART_NAME -#line 1969 "seclang-parser.yy" +#line 1970 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_NoDictElement()); } @@ -3567,7 +3567,7 @@ namespace yy { break; case 187: // var: VARIABLE_MATCHED_VARS_NAMES "Dictionary element" -#line 1973 "seclang-parser.yy" +#line 1974 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3575,7 +3575,7 @@ namespace yy { break; case 188: // var: VARIABLE_MATCHED_VARS_NAMES "Dictionary element, selected by regexp" -#line 1977 "seclang-parser.yy" +#line 1978 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3583,7 +3583,7 @@ namespace yy { break; case 189: // var: VARIABLE_MATCHED_VARS_NAMES -#line 1981 "seclang-parser.yy" +#line 1982 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_NoDictElement()); } @@ -3591,7 +3591,7 @@ namespace yy { break; case 190: // var: VARIABLE_MATCHED_VARS "Dictionary element" -#line 1985 "seclang-parser.yy" +#line 1986 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3599,7 +3599,7 @@ namespace yy { break; case 191: // var: VARIABLE_MATCHED_VARS "Dictionary element, selected by regexp" -#line 1989 "seclang-parser.yy" +#line 1990 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3607,7 +3607,7 @@ namespace yy { break; case 192: // var: VARIABLE_MATCHED_VARS -#line 1993 "seclang-parser.yy" +#line 1994 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_NoDictElement()); } @@ -3615,7 +3615,7 @@ namespace yy { break; case 193: // var: VARIABLE_FILES "Dictionary element" -#line 1997 "seclang-parser.yy" +#line 1998 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3623,7 +3623,7 @@ namespace yy { break; case 194: // var: VARIABLE_FILES "Dictionary element, selected by regexp" -#line 2001 "seclang-parser.yy" +#line 2002 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3631,7 +3631,7 @@ namespace yy { break; case 195: // var: VARIABLE_FILES -#line 2005 "seclang-parser.yy" +#line 2006 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_NoDictElement()); } @@ -3639,7 +3639,7 @@ namespace yy { break; case 196: // var: VARIABLE_REQUEST_COOKIES "Dictionary element" -#line 2009 "seclang-parser.yy" +#line 2010 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3647,7 +3647,7 @@ namespace yy { break; case 197: // var: VARIABLE_REQUEST_COOKIES "Dictionary element, selected by regexp" -#line 2013 "seclang-parser.yy" +#line 2014 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3655,7 +3655,7 @@ namespace yy { break; case 198: // var: VARIABLE_REQUEST_COOKIES -#line 2017 "seclang-parser.yy" +#line 2018 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_NoDictElement()); } @@ -3663,7 +3663,7 @@ namespace yy { break; case 199: // var: VARIABLE_REQUEST_HEADERS "Dictionary element" -#line 2021 "seclang-parser.yy" +#line 2022 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3671,7 +3671,7 @@ namespace yy { break; case 200: // var: VARIABLE_REQUEST_HEADERS "Dictionary element, selected by regexp" -#line 2025 "seclang-parser.yy" +#line 2026 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3679,7 +3679,7 @@ namespace yy { break; case 201: // var: VARIABLE_REQUEST_HEADERS -#line 2029 "seclang-parser.yy" +#line 2030 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_NoDictElement()); } @@ -3687,7 +3687,7 @@ namespace yy { break; case 202: // var: VARIABLE_RESPONSE_HEADERS "Dictionary element" -#line 2033 "seclang-parser.yy" +#line 2034 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3695,7 +3695,7 @@ namespace yy { break; case 203: // var: VARIABLE_RESPONSE_HEADERS "Dictionary element, selected by regexp" -#line 2037 "seclang-parser.yy" +#line 2038 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3703,7 +3703,7 @@ namespace yy { break; case 204: // var: VARIABLE_RESPONSE_HEADERS -#line 2041 "seclang-parser.yy" +#line 2042 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_NoDictElement()); } @@ -3711,7 +3711,7 @@ namespace yy { break; case 205: // var: VARIABLE_GEO "Dictionary element" -#line 2045 "seclang-parser.yy" +#line 2046 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3719,7 +3719,7 @@ namespace yy { break; case 206: // var: VARIABLE_GEO "Dictionary element, selected by regexp" -#line 2049 "seclang-parser.yy" +#line 2050 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3727,7 +3727,7 @@ namespace yy { break; case 207: // var: VARIABLE_GEO -#line 2053 "seclang-parser.yy" +#line 2054 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_NoDictElement()); } @@ -3735,7 +3735,7 @@ namespace yy { break; case 208: // var: VARIABLE_REQUEST_COOKIES_NAMES "Dictionary element" -#line 2057 "seclang-parser.yy" +#line 2058 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3743,7 +3743,7 @@ namespace yy { break; case 209: // var: VARIABLE_REQUEST_COOKIES_NAMES "Dictionary element, selected by regexp" -#line 2061 "seclang-parser.yy" +#line 2062 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3751,7 +3751,7 @@ namespace yy { break; case 210: // var: VARIABLE_REQUEST_COOKIES_NAMES -#line 2065 "seclang-parser.yy" +#line 2066 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_NoDictElement()); } @@ -3759,7 +3759,7 @@ namespace yy { break; case 211: // var: VARIABLE_RULE "Dictionary element" -#line 2069 "seclang-parser.yy" +#line 2070 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3767,7 +3767,7 @@ namespace yy { break; case 212: // var: VARIABLE_RULE "Dictionary element, selected by regexp" -#line 2073 "seclang-parser.yy" +#line 2074 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3775,7 +3775,7 @@ namespace yy { break; case 213: // var: VARIABLE_RULE -#line 2077 "seclang-parser.yy" +#line 2078 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_NoDictElement()); } @@ -3783,7 +3783,7 @@ namespace yy { break; case 214: // var: "RUN_TIME_VAR_ENV" "Dictionary element" -#line 2081 "seclang-parser.yy" +#line 2082 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV:" + yystack_[0].value.as < std::string > ())); } @@ -3791,7 +3791,7 @@ namespace yy { break; case 215: // var: "RUN_TIME_VAR_ENV" "Dictionary element, selected by regexp" -#line 2085 "seclang-parser.yy" +#line 2086 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV:" + yystack_[0].value.as < std::string > ())); } @@ -3799,7 +3799,7 @@ namespace yy { break; case 216: // var: "RUN_TIME_VAR_ENV" -#line 2089 "seclang-parser.yy" +#line 2090 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV")); } @@ -3807,7 +3807,7 @@ namespace yy { break; case 217: // var: "RUN_TIME_VAR_XML" "Dictionary element" -#line 2093 "seclang-parser.yy" +#line 2094 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML_WithNSPath(yystack_[0].value.as < std::string > ())); } @@ -3815,7 +3815,7 @@ namespace yy { break; case 218: // var: "RUN_TIME_VAR_XML" "Dictionary element, selected by regexp" -#line 2097 "seclang-parser.yy" +#line 2098 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML_WithNSPath(yystack_[0].value.as < std::string > ())); } @@ -3823,7 +3823,7 @@ namespace yy { break; case 219: // var: "RUN_TIME_VAR_XML" -#line 2101 "seclang-parser.yy" +#line 2102 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML_WithoutNSPath()); } @@ -3831,7 +3831,7 @@ namespace yy { break; case 220: // var: "FILES_TMPNAMES" "Dictionary element" -#line 2105 "seclang-parser.yy" +#line 2106 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3839,7 +3839,7 @@ namespace yy { break; case 221: // var: "FILES_TMPNAMES" "Dictionary element, selected by regexp" -#line 2109 "seclang-parser.yy" +#line 2110 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3847,7 +3847,7 @@ namespace yy { break; case 222: // var: "FILES_TMPNAMES" -#line 2113 "seclang-parser.yy" +#line 2114 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_NoDictElement()); } @@ -3855,7 +3855,7 @@ namespace yy { break; case 223: // var: "RESOURCE" run_time_string -#line 2117 "seclang-parser.yy" +#line 2118 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3863,7 +3863,7 @@ namespace yy { break; case 224: // var: "RESOURCE" "Dictionary element" -#line 2121 "seclang-parser.yy" +#line 2122 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3871,7 +3871,7 @@ namespace yy { break; case 225: // var: "RESOURCE" "Dictionary element, selected by regexp" -#line 2125 "seclang-parser.yy" +#line 2126 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3879,7 +3879,7 @@ namespace yy { break; case 226: // var: "RESOURCE" -#line 2129 "seclang-parser.yy" +#line 2130 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_NoDictElement()); } @@ -3887,7 +3887,7 @@ namespace yy { break; case 227: // var: "VARIABLE_IP" run_time_string -#line 2133 "seclang-parser.yy" +#line 2134 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3895,7 +3895,7 @@ namespace yy { break; case 228: // var: "VARIABLE_IP" "Dictionary element" -#line 2137 "seclang-parser.yy" +#line 2138 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3903,7 +3903,7 @@ namespace yy { break; case 229: // var: "VARIABLE_IP" "Dictionary element, selected by regexp" -#line 2141 "seclang-parser.yy" +#line 2142 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3911,7 +3911,7 @@ namespace yy { break; case 230: // var: "VARIABLE_IP" -#line 2145 "seclang-parser.yy" +#line 2146 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_NoDictElement()); } @@ -3919,7 +3919,7 @@ namespace yy { break; case 231: // var: "VARIABLE_GLOBAL" run_time_string -#line 2149 "seclang-parser.yy" +#line 2150 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3927,7 +3927,7 @@ namespace yy { break; case 232: // var: "VARIABLE_GLOBAL" "Dictionary element" -#line 2153 "seclang-parser.yy" +#line 2154 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3935,7 +3935,7 @@ namespace yy { break; case 233: // var: "VARIABLE_GLOBAL" "Dictionary element, selected by regexp" -#line 2157 "seclang-parser.yy" +#line 2158 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3943,7 +3943,7 @@ namespace yy { break; case 234: // var: "VARIABLE_GLOBAL" -#line 2161 "seclang-parser.yy" +#line 2162 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_NoDictElement()); } @@ -3951,7 +3951,7 @@ namespace yy { break; case 235: // var: "VARIABLE_USER" run_time_string -#line 2165 "seclang-parser.yy" +#line 2166 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3959,7 +3959,7 @@ namespace yy { break; case 236: // var: "VARIABLE_USER" "Dictionary element" -#line 2169 "seclang-parser.yy" +#line 2170 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3967,7 +3967,7 @@ namespace yy { break; case 237: // var: "VARIABLE_USER" "Dictionary element, selected by regexp" -#line 2173 "seclang-parser.yy" +#line 2174 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3975,7 +3975,7 @@ namespace yy { break; case 238: // var: "VARIABLE_USER" -#line 2177 "seclang-parser.yy" +#line 2178 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_NoDictElement()); } @@ -3983,7 +3983,7 @@ namespace yy { break; case 239: // var: "VARIABLE_TX" run_time_string -#line 2181 "seclang-parser.yy" +#line 2182 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3991,7 +3991,7 @@ namespace yy { break; case 240: // var: "VARIABLE_TX" "Dictionary element" -#line 2185 "seclang-parser.yy" +#line 2186 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3999,7 +3999,7 @@ namespace yy { break; case 241: // var: "VARIABLE_TX" "Dictionary element, selected by regexp" -#line 2189 "seclang-parser.yy" +#line 2190 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4007,7 +4007,7 @@ namespace yy { break; case 242: // var: "VARIABLE_TX" -#line 2193 "seclang-parser.yy" +#line 2194 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_NoDictElement()); } @@ -4015,7 +4015,7 @@ namespace yy { break; case 243: // var: "VARIABLE_SESSION" run_time_string -#line 2197 "seclang-parser.yy" +#line 2198 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -4023,7 +4023,7 @@ namespace yy { break; case 244: // var: "VARIABLE_SESSION" "Dictionary element" -#line 2201 "seclang-parser.yy" +#line 2202 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4031,7 +4031,7 @@ namespace yy { break; case 245: // var: "VARIABLE_SESSION" "Dictionary element, selected by regexp" -#line 2205 "seclang-parser.yy" +#line 2206 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4039,7 +4039,7 @@ namespace yy { break; case 246: // var: "VARIABLE_SESSION" -#line 2209 "seclang-parser.yy" +#line 2210 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_NoDictElement()); } @@ -4047,7 +4047,7 @@ namespace yy { break; case 247: // var: "Variable ARGS_NAMES" "Dictionary element" -#line 2213 "seclang-parser.yy" +#line 2214 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4055,7 +4055,7 @@ namespace yy { break; case 248: // var: "Variable ARGS_NAMES" "Dictionary element, selected by regexp" -#line 2217 "seclang-parser.yy" +#line 2218 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4063,7 +4063,7 @@ namespace yy { break; case 249: // var: "Variable ARGS_NAMES" -#line 2221 "seclang-parser.yy" +#line 2222 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_NoDictElement()); } @@ -4071,7 +4071,7 @@ namespace yy { break; case 250: // var: VARIABLE_ARGS_GET_NAMES "Dictionary element" -#line 2225 "seclang-parser.yy" +#line 2226 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4079,7 +4079,7 @@ namespace yy { break; case 251: // var: VARIABLE_ARGS_GET_NAMES "Dictionary element, selected by regexp" -#line 2229 "seclang-parser.yy" +#line 2230 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4087,7 +4087,7 @@ namespace yy { break; case 252: // var: VARIABLE_ARGS_GET_NAMES -#line 2233 "seclang-parser.yy" +#line 2234 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_NoDictElement()); } @@ -4095,7 +4095,7 @@ namespace yy { break; case 253: // var: VARIABLE_ARGS_POST_NAMES "Dictionary element" -#line 2238 "seclang-parser.yy" +#line 2239 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4103,7 +4103,7 @@ namespace yy { break; case 254: // var: VARIABLE_ARGS_POST_NAMES "Dictionary element, selected by regexp" -#line 2242 "seclang-parser.yy" +#line 2243 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4111,7 +4111,7 @@ namespace yy { break; case 255: // var: VARIABLE_ARGS_POST_NAMES -#line 2246 "seclang-parser.yy" +#line 2247 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_NoDictElement()); } @@ -4119,7 +4119,7 @@ namespace yy { break; case 256: // var: VARIABLE_REQUEST_HEADERS_NAMES "Dictionary element" -#line 2251 "seclang-parser.yy" +#line 2252 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4127,7 +4127,7 @@ namespace yy { break; case 257: // var: VARIABLE_REQUEST_HEADERS_NAMES "Dictionary element, selected by regexp" -#line 2255 "seclang-parser.yy" +#line 2256 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4135,7 +4135,7 @@ namespace yy { break; case 258: // var: VARIABLE_REQUEST_HEADERS_NAMES -#line 2259 "seclang-parser.yy" +#line 2260 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_NoDictElement()); } @@ -4143,7 +4143,7 @@ namespace yy { break; case 259: // var: VARIABLE_RESPONSE_CONTENT_TYPE -#line 2264 "seclang-parser.yy" +#line 2265 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseContentType()); } @@ -4151,7 +4151,7 @@ namespace yy { break; case 260: // var: VARIABLE_RESPONSE_HEADERS_NAMES "Dictionary element" -#line 2269 "seclang-parser.yy" +#line 2270 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4159,7 +4159,7 @@ namespace yy { break; case 261: // var: VARIABLE_RESPONSE_HEADERS_NAMES "Dictionary element, selected by regexp" -#line 2273 "seclang-parser.yy" +#line 2274 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4167,7 +4167,7 @@ namespace yy { break; case 262: // var: VARIABLE_RESPONSE_HEADERS_NAMES -#line 2277 "seclang-parser.yy" +#line 2278 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_NoDictElement()); } @@ -4175,7 +4175,7 @@ namespace yy { break; case 263: // var: VARIABLE_ARGS_COMBINED_SIZE -#line 2281 "seclang-parser.yy" +#line 2282 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsCombinedSize()); } @@ -4183,7 +4183,7 @@ namespace yy { break; case 264: // var: "AUTH_TYPE" -#line 2285 "seclang-parser.yy" +#line 2286 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::AuthType()); } @@ -4191,7 +4191,7 @@ namespace yy { break; case 265: // var: "FILES_COMBINED_SIZE" -#line 2289 "seclang-parser.yy" +#line 2290 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesCombinedSize()); } @@ -4199,7 +4199,7 @@ namespace yy { break; case 266: // var: "FULL_REQUEST" -#line 2293 "seclang-parser.yy" +#line 2294 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FullRequest()); } @@ -4207,7 +4207,7 @@ namespace yy { break; case 267: // var: "FULL_REQUEST_LENGTH" -#line 2297 "seclang-parser.yy" +#line 2298 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FullRequestLength()); } @@ -4215,7 +4215,7 @@ namespace yy { break; case 268: // var: "INBOUND_DATA_ERROR" -#line 2301 "seclang-parser.yy" +#line 2302 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::InboundDataError()); } @@ -4223,7 +4223,7 @@ namespace yy { break; case 269: // var: "MATCHED_VAR" -#line 2305 "seclang-parser.yy" +#line 2306 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVar()); } @@ -4231,7 +4231,7 @@ namespace yy { break; case 270: // var: "MATCHED_VAR_NAME" -#line 2309 "seclang-parser.yy" +#line 2310 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarName()); } @@ -4239,7 +4239,7 @@ namespace yy { break; case 271: // var: VARIABLE_MULTIPART_BOUNDARY_QUOTED -#line 2313 "seclang-parser.yy" +#line 2314 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartBoundaryQuoted()); } @@ -4247,7 +4247,7 @@ namespace yy { break; case 272: // var: VARIABLE_MULTIPART_BOUNDARY_WHITESPACE -#line 2317 "seclang-parser.yy" +#line 2318 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartBoundaryWhiteSpace()); } @@ -4255,7 +4255,7 @@ namespace yy { break; case 273: // var: "MULTIPART_CRLF_LF_LINES" -#line 2321 "seclang-parser.yy" +#line 2322 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartCrlfLFLines()); } @@ -4263,7 +4263,7 @@ namespace yy { break; case 274: // var: "MULTIPART_DATA_AFTER" -#line 2325 "seclang-parser.yy" +#line 2326 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartDateAfter()); } @@ -4271,7 +4271,7 @@ namespace yy { break; case 275: // var: VARIABLE_MULTIPART_DATA_BEFORE -#line 2329 "seclang-parser.yy" +#line 2330 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartDateBefore()); } @@ -4279,7 +4279,7 @@ namespace yy { break; case 276: // var: "MULTIPART_FILE_LIMIT_EXCEEDED" -#line 2333 "seclang-parser.yy" +#line 2334 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartFileLimitExceeded()); } @@ -4287,7 +4287,7 @@ namespace yy { break; case 277: // var: "MULTIPART_HEADER_FOLDING" -#line 2337 "seclang-parser.yy" +#line 2338 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartHeaderFolding()); } @@ -4295,7 +4295,7 @@ namespace yy { break; case 278: // var: "MULTIPART_INVALID_HEADER_FOLDING" -#line 2341 "seclang-parser.yy" +#line 2342 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidHeaderFolding()); } @@ -4303,7 +4303,7 @@ namespace yy { break; case 279: // var: VARIABLE_MULTIPART_INVALID_PART -#line 2345 "seclang-parser.yy" +#line 2346 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidPart()); } @@ -4311,7 +4311,7 @@ namespace yy { break; case 280: // var: "MULTIPART_INVALID_QUOTING" -#line 2349 "seclang-parser.yy" +#line 2350 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidQuoting()); } @@ -4319,7 +4319,7 @@ namespace yy { break; case 281: // var: VARIABLE_MULTIPART_LF_LINE -#line 2353 "seclang-parser.yy" +#line 2354 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartLFLine()); } @@ -4327,7 +4327,7 @@ namespace yy { break; case 282: // var: VARIABLE_MULTIPART_MISSING_SEMICOLON -#line 2357 "seclang-parser.yy" +#line 2358 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartMissingSemicolon()); } @@ -4335,7 +4335,7 @@ namespace yy { break; case 283: // var: VARIABLE_MULTIPART_SEMICOLON_MISSING -#line 2361 "seclang-parser.yy" +#line 2362 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartMissingSemicolon()); } @@ -4343,7 +4343,7 @@ namespace yy { break; case 284: // var: "MULTIPART_STRICT_ERROR" -#line 2365 "seclang-parser.yy" +#line 2366 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartStrictError()); } @@ -4351,7 +4351,7 @@ namespace yy { break; case 285: // var: "MULTIPART_UNMATCHED_BOUNDARY" -#line 2369 "seclang-parser.yy" +#line 2370 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartUnmatchedBoundary()); } @@ -4359,7 +4359,7 @@ namespace yy { break; case 286: // var: "OUTBOUND_DATA_ERROR" -#line 2373 "seclang-parser.yy" +#line 2374 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::OutboundDataError()); } @@ -4367,7 +4367,7 @@ namespace yy { break; case 287: // var: "PATH_INFO" -#line 2377 "seclang-parser.yy" +#line 2378 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::PathInfo()); } @@ -4375,7 +4375,7 @@ namespace yy { break; case 288: // var: "QUERY_STRING" -#line 2381 "seclang-parser.yy" +#line 2382 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::QueryString()); } @@ -4383,7 +4383,7 @@ namespace yy { break; case 289: // var: "REMOTE_ADDR" -#line 2385 "seclang-parser.yy" +#line 2386 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemoteAddr()); } @@ -4391,7 +4391,7 @@ namespace yy { break; case 290: // var: "REMOTE_HOST" -#line 2389 "seclang-parser.yy" +#line 2390 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemoteHost()); } @@ -4399,7 +4399,7 @@ namespace yy { break; case 291: // var: "REMOTE_PORT" -#line 2393 "seclang-parser.yy" +#line 2394 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemotePort()); } @@ -4407,7 +4407,7 @@ namespace yy { break; case 292: // var: "REQBODY_ERROR" -#line 2397 "seclang-parser.yy" +#line 2398 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyError()); } @@ -4415,7 +4415,7 @@ namespace yy { break; case 293: // var: "REQBODY_ERROR_MSG" -#line 2401 "seclang-parser.yy" +#line 2402 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyErrorMsg()); } @@ -4423,7 +4423,7 @@ namespace yy { break; case 294: // var: "REQBODY_PROCESSOR" -#line 2405 "seclang-parser.yy" +#line 2406 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessor()); } @@ -4431,7 +4431,7 @@ namespace yy { break; case 295: // var: "REQBODY_PROCESSOR_ERROR" -#line 2409 "seclang-parser.yy" +#line 2410 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessorError()); } @@ -4439,7 +4439,7 @@ namespace yy { break; case 296: // var: "REQBODY_PROCESSOR_ERROR_MSG" -#line 2413 "seclang-parser.yy" +#line 2414 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessorErrorMsg()); } @@ -4447,7 +4447,7 @@ namespace yy { break; case 297: // var: "REQUEST_BASENAME" -#line 2417 "seclang-parser.yy" +#line 2418 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBasename()); } @@ -4455,7 +4455,7 @@ namespace yy { break; case 298: // var: "REQUEST_BODY" -#line 2421 "seclang-parser.yy" +#line 2422 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBody()); } @@ -4463,7 +4463,7 @@ namespace yy { break; case 299: // var: "REQUEST_BODY_LENGTH" -#line 2425 "seclang-parser.yy" +#line 2426 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBodyLength()); } @@ -4471,7 +4471,7 @@ namespace yy { break; case 300: // var: "REQUEST_FILENAME" -#line 2429 "seclang-parser.yy" +#line 2430 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestFilename()); } @@ -4479,7 +4479,7 @@ namespace yy { break; case 301: // var: "REQUEST_LINE" -#line 2433 "seclang-parser.yy" +#line 2434 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestLine()); } @@ -4487,7 +4487,7 @@ namespace yy { break; case 302: // var: "REQUEST_METHOD" -#line 2437 "seclang-parser.yy" +#line 2438 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestMethod()); } @@ -4495,7 +4495,7 @@ namespace yy { break; case 303: // var: "REQUEST_PROTOCOL" -#line 2441 "seclang-parser.yy" +#line 2442 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestProtocol()); } @@ -4503,7 +4503,7 @@ namespace yy { break; case 304: // var: "REQUEST_URI" -#line 2445 "seclang-parser.yy" +#line 2446 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestURI()); } @@ -4511,7 +4511,7 @@ namespace yy { break; case 305: // var: "REQUEST_URI_RAW" -#line 2449 "seclang-parser.yy" +#line 2450 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestURIRaw()); } @@ -4519,7 +4519,7 @@ namespace yy { break; case 306: // var: "RESPONSE_BODY" -#line 2453 "seclang-parser.yy" +#line 2454 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseBody()); } @@ -4527,7 +4527,7 @@ namespace yy { break; case 307: // var: "RESPONSE_CONTENT_LENGTH" -#line 2457 "seclang-parser.yy" +#line 2458 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseContentLength()); } @@ -4535,7 +4535,7 @@ namespace yy { break; case 308: // var: "RESPONSE_PROTOCOL" -#line 2461 "seclang-parser.yy" +#line 2462 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseProtocol()); } @@ -4543,7 +4543,7 @@ namespace yy { break; case 309: // var: "RESPONSE_STATUS" -#line 2465 "seclang-parser.yy" +#line 2466 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseStatus()); } @@ -4551,7 +4551,7 @@ namespace yy { break; case 310: // var: "SERVER_ADDR" -#line 2469 "seclang-parser.yy" +#line 2470 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerAddr()); } @@ -4559,7 +4559,7 @@ namespace yy { break; case 311: // var: "SERVER_NAME" -#line 2473 "seclang-parser.yy" +#line 2474 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerName()); } @@ -4567,7 +4567,7 @@ namespace yy { break; case 312: // var: "SERVER_PORT" -#line 2477 "seclang-parser.yy" +#line 2478 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerPort()); } @@ -4575,7 +4575,7 @@ namespace yy { break; case 313: // var: "SESSIONID" -#line 2481 "seclang-parser.yy" +#line 2482 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::SessionID()); } @@ -4583,7 +4583,7 @@ namespace yy { break; case 314: // var: "UNIQUE_ID" -#line 2485 "seclang-parser.yy" +#line 2486 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UniqueID()); } @@ -4591,7 +4591,7 @@ namespace yy { break; case 315: // var: "URLENCODED_ERROR" -#line 2489 "seclang-parser.yy" +#line 2490 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UrlEncodedError()); } @@ -4599,7 +4599,7 @@ namespace yy { break; case 316: // var: "USERID" -#line 2493 "seclang-parser.yy" +#line 2494 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UserID()); } @@ -4607,7 +4607,7 @@ namespace yy { break; case 317: // var: "VARIABLE_STATUS" -#line 2497 "seclang-parser.yy" +#line 2498 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Status()); } @@ -4615,7 +4615,7 @@ namespace yy { break; case 318: // var: "VARIABLE_STATUS_LINE" -#line 2501 "seclang-parser.yy" +#line 2502 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Status()); } @@ -4623,7 +4623,7 @@ namespace yy { break; case 319: // var: "WEBAPPID" -#line 2505 "seclang-parser.yy" +#line 2506 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::WebAppId()); } @@ -4631,7 +4631,7 @@ namespace yy { break; case 320: // var: "RUN_TIME_VAR_DUR" -#line 2509 "seclang-parser.yy" +#line 2510 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4642,7 +4642,7 @@ namespace yy { break; case 321: // var: "RUN_TIME_VAR_BLD" -#line 2517 "seclang-parser.yy" +#line 2518 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4653,7 +4653,7 @@ namespace yy { break; case 322: // var: "RUN_TIME_VAR_HSV" -#line 2524 "seclang-parser.yy" +#line 2525 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4664,7 +4664,7 @@ namespace yy { break; case 323: // var: "RUN_TIME_VAR_REMOTE_USER" -#line 2531 "seclang-parser.yy" +#line 2532 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4675,7 +4675,7 @@ namespace yy { break; case 324: // var: "RUN_TIME_VAR_TIME" -#line 2538 "seclang-parser.yy" +#line 2539 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4686,7 +4686,7 @@ namespace yy { break; case 325: // var: "RUN_TIME_VAR_TIME_DAY" -#line 2545 "seclang-parser.yy" +#line 2546 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4697,7 +4697,7 @@ namespace yy { break; case 326: // var: "RUN_TIME_VAR_TIME_EPOCH" -#line 2552 "seclang-parser.yy" +#line 2553 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4708,7 +4708,7 @@ namespace yy { break; case 327: // var: "RUN_TIME_VAR_TIME_HOUR" -#line 2559 "seclang-parser.yy" +#line 2560 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4719,7 +4719,7 @@ namespace yy { break; case 328: // var: "RUN_TIME_VAR_TIME_MIN" -#line 2566 "seclang-parser.yy" +#line 2567 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4730,7 +4730,7 @@ namespace yy { break; case 329: // var: "RUN_TIME_VAR_TIME_MON" -#line 2573 "seclang-parser.yy" +#line 2574 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4741,7 +4741,7 @@ namespace yy { break; case 330: // var: "RUN_TIME_VAR_TIME_SEC" -#line 2580 "seclang-parser.yy" +#line 2581 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4752,7 +4752,7 @@ namespace yy { break; case 331: // var: "RUN_TIME_VAR_TIME_WDAY" -#line 2587 "seclang-parser.yy" +#line 2588 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4763,7 +4763,7 @@ namespace yy { break; case 332: // var: "RUN_TIME_VAR_TIME_YEAR" -#line 2594 "seclang-parser.yy" +#line 2595 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4774,7 +4774,7 @@ namespace yy { break; case 333: // act: "Accuracy" -#line 2604 "seclang-parser.yy" +#line 2605 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Accuracy(yystack_[0].value.as < std::string > ())); } @@ -4782,7 +4782,7 @@ namespace yy { break; case 334: // act: "Allow" -#line 2608 "seclang-parser.yy" +#line 2609 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Allow(yystack_[0].value.as < std::string > ())); } @@ -4790,7 +4790,7 @@ namespace yy { break; case 335: // act: "Append" -#line 2612 "seclang-parser.yy" +#line 2613 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Append", yystack_[1].location); } @@ -4798,7 +4798,7 @@ namespace yy { break; case 336: // act: "AuditLog" -#line 2616 "seclang-parser.yy" +#line 2617 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::AuditLog()); } @@ -4806,7 +4806,7 @@ namespace yy { break; case 337: // act: "Block" -#line 2620 "seclang-parser.yy" +#line 2621 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Block()); } @@ -4814,7 +4814,7 @@ namespace yy { break; case 338: // act: "Capture" -#line 2624 "seclang-parser.yy" +#line 2625 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Capture()); } @@ -4822,7 +4822,7 @@ namespace yy { break; case 339: // act: "Chain" -#line 2628 "seclang-parser.yy" +#line 2629 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Chain()); } @@ -4830,7 +4830,7 @@ namespace yy { break; case 340: // act: "ACTION_CTL_AUDIT_ENGINE" "CONFIG_VALUE_ON" -#line 2632 "seclang-parser.yy" +#line 2633 "seclang-parser.yy" { //ACTION_NOT_SUPPORTED("CtlAuditEngine", @0); ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[1].value.as < std::string > ())); @@ -4839,7 +4839,7 @@ namespace yy { break; case 341: // act: "ACTION_CTL_AUDIT_ENGINE" "CONFIG_VALUE_OFF" -#line 2637 "seclang-parser.yy" +#line 2638 "seclang-parser.yy" { //ACTION_NOT_SUPPORTED("CtlAuditEngine", @0); ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[1].value.as < std::string > ())); @@ -4848,7 +4848,7 @@ namespace yy { break; case 342: // act: "ACTION_CTL_AUDIT_ENGINE" "CONFIG_VALUE_RELEVANT_ONLY" -#line 2642 "seclang-parser.yy" +#line 2643 "seclang-parser.yy" { //ACTION_NOT_SUPPORTED("CtlAuditEngine", @0); ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[1].value.as < std::string > ())); @@ -4857,7 +4857,7 @@ namespace yy { break; case 343: // act: "ACTION_CTL_AUDIT_LOG_PARTS" -#line 2647 "seclang-parser.yy" +#line 2648 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::AuditLogParts(yystack_[0].value.as < std::string > ())); } @@ -4865,7 +4865,7 @@ namespace yy { break; case 344: // act: "ACTION_CTL_BDY_JSON" -#line 2651 "seclang-parser.yy" +#line 2652 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorJSON(yystack_[0].value.as < std::string > ())); } @@ -4873,7 +4873,7 @@ namespace yy { break; case 345: // act: "ACTION_CTL_BDY_XML" -#line 2655 "seclang-parser.yy" +#line 2656 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorXML(yystack_[0].value.as < std::string > ())); } @@ -4881,7 +4881,7 @@ namespace yy { break; case 346: // act: "ACTION_CTL_BDY_URLENCODED" -#line 2659 "seclang-parser.yy" +#line 2660 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorURLENCODED(yystack_[0].value.as < std::string > ())); } @@ -4889,7 +4889,7 @@ namespace yy { break; case 347: // act: "ACTION_CTL_FORCE_REQ_BODY_VAR" "CONFIG_VALUE_ON" -#line 2663 "seclang-parser.yy" +#line 2664 "seclang-parser.yy" { //ACTION_NOT_SUPPORTED("CtlForceReequestBody", @0); ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[1].value.as < std::string > ())); @@ -4898,7 +4898,7 @@ namespace yy { break; case 348: // act: "ACTION_CTL_FORCE_REQ_BODY_VAR" "CONFIG_VALUE_OFF" -#line 2668 "seclang-parser.yy" +#line 2669 "seclang-parser.yy" { //ACTION_NOT_SUPPORTED("CtlForceReequestBody", @0); ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[1].value.as < std::string > ())); @@ -4907,7 +4907,7 @@ namespace yy { break; case 349: // act: "ACTION_CTL_REQUEST_BODY_ACCESS" "CONFIG_VALUE_ON" -#line 2673 "seclang-parser.yy" +#line 2674 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyAccess(yystack_[1].value.as < std::string > () + "true")); } @@ -4915,7 +4915,7 @@ namespace yy { break; case 350: // act: "ACTION_CTL_REQUEST_BODY_ACCESS" "CONFIG_VALUE_OFF" -#line 2677 "seclang-parser.yy" +#line 2678 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyAccess(yystack_[1].value.as < std::string > () + "false")); } @@ -4923,7 +4923,7 @@ namespace yy { break; case 351: // act: "ACTION_CTL_RULE_ENGINE" "CONFIG_VALUE_ON" -#line 2681 "seclang-parser.yy" +#line 2682 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=on")); } @@ -4931,7 +4931,7 @@ namespace yy { break; case 352: // act: "ACTION_CTL_RULE_ENGINE" "CONFIG_VALUE_OFF" -#line 2685 "seclang-parser.yy" +#line 2686 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=off")); } @@ -4939,7 +4939,7 @@ namespace yy { break; case 353: // act: "ACTION_CTL_RULE_ENGINE" "CONFIG_VALUE_DETC" -#line 2689 "seclang-parser.yy" +#line 2690 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=detectiononly")); } @@ -4947,7 +4947,7 @@ namespace yy { break; case 354: // act: "ACTION_CTL_RULE_REMOVE_BY_ID" -#line 2693 "seclang-parser.yy" +#line 2694 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveById(yystack_[0].value.as < std::string > ())); } @@ -4955,7 +4955,7 @@ namespace yy { break; case 355: // act: "ACTION_CTL_RULE_REMOVE_BY_TAG" -#line 2697 "seclang-parser.yy" +#line 2698 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveByTag(yystack_[0].value.as < std::string > ())); } @@ -4963,7 +4963,7 @@ namespace yy { break; case 356: // act: "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" -#line 2701 "seclang-parser.yy" +#line 2702 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveTargetById(yystack_[0].value.as < std::string > ())); } @@ -4971,7 +4971,7 @@ namespace yy { break; case 357: // act: "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" -#line 2705 "seclang-parser.yy" +#line 2706 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveTargetByTag(yystack_[0].value.as < std::string > ())); } @@ -4979,7 +4979,7 @@ namespace yy { break; case 358: // act: "Deny" -#line 2709 "seclang-parser.yy" +#line 2710 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Deny()); } @@ -4987,7 +4987,7 @@ namespace yy { break; case 359: // act: "DeprecateVar" -#line 2713 "seclang-parser.yy" +#line 2714 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("DeprecateVar", yystack_[1].location); } @@ -4995,7 +4995,7 @@ namespace yy { break; case 360: // act: "Drop" -#line 2717 "seclang-parser.yy" +#line 2718 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Drop()); } @@ -5003,7 +5003,7 @@ namespace yy { break; case 361: // act: "Exec" -#line 2721 "seclang-parser.yy" +#line 2722 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Exec(yystack_[0].value.as < std::string > ())); } @@ -5011,12 +5011,11 @@ namespace yy { break; case 362: // act: "ExpireVar" -#line 2725 "seclang-parser.yy" +#line 2726 "seclang-parser.yy" { - //ACTION_NOT_SUPPORTED("ExpireVar", @0); - ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Action(yystack_[0].value.as < std::string > ())); + ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ExpireVar(yystack_[0].value.as < std::string > ())); } -#line 5020 "seclang-parser.cc" +#line 5019 "seclang-parser.cc" break; case 363: // act: "Id" @@ -5024,7 +5023,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::RuleId(yystack_[0].value.as < std::string > ())); } -#line 5028 "seclang-parser.cc" +#line 5027 "seclang-parser.cc" break; case 364: // act: "InitCol" run_time_string @@ -5032,7 +5031,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::InitCol(yystack_[1].value.as < std::string > (), std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5036 "seclang-parser.cc" +#line 5035 "seclang-parser.cc" break; case 365: // act: "LogData" run_time_string @@ -5040,7 +5039,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::LogData(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5044 "seclang-parser.cc" +#line 5043 "seclang-parser.cc" break; case 366: // act: "Log" @@ -5048,7 +5047,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Log()); } -#line 5052 "seclang-parser.cc" +#line 5051 "seclang-parser.cc" break; case 367: // act: "Maturity" @@ -5056,7 +5055,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Maturity(yystack_[0].value.as < std::string > ())); } -#line 5060 "seclang-parser.cc" +#line 5059 "seclang-parser.cc" break; case 368: // act: "Msg" run_time_string @@ -5064,7 +5063,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Msg(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5068 "seclang-parser.cc" +#line 5067 "seclang-parser.cc" break; case 369: // act: "MultiMatch" @@ -5072,7 +5071,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::MultiMatch()); } -#line 5076 "seclang-parser.cc" +#line 5075 "seclang-parser.cc" break; case 370: // act: "NoAuditLog" @@ -5080,7 +5079,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::NoAuditLog()); } -#line 5084 "seclang-parser.cc" +#line 5083 "seclang-parser.cc" break; case 371: // act: "NoLog" @@ -5088,7 +5087,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::NoLog()); } -#line 5092 "seclang-parser.cc" +#line 5091 "seclang-parser.cc" break; case 372: // act: "Pass" @@ -5096,7 +5095,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Pass()); } -#line 5100 "seclang-parser.cc" +#line 5099 "seclang-parser.cc" break; case 373: // act: "Pause" @@ -5104,7 +5103,7 @@ namespace yy { { ACTION_NOT_SUPPORTED("Pause", yystack_[1].location); } -#line 5108 "seclang-parser.cc" +#line 5107 "seclang-parser.cc" break; case 374: // act: "Phase" @@ -5112,7 +5111,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Phase(yystack_[0].value.as < std::string > ())); } -#line 5116 "seclang-parser.cc" +#line 5115 "seclang-parser.cc" break; case 375: // act: "Prepend" @@ -5120,7 +5119,7 @@ namespace yy { { ACTION_NOT_SUPPORTED("Prepend", yystack_[1].location); } -#line 5124 "seclang-parser.cc" +#line 5123 "seclang-parser.cc" break; case 376: // act: "Proxy" @@ -5128,7 +5127,7 @@ namespace yy { { ACTION_NOT_SUPPORTED("Proxy", yystack_[1].location); } -#line 5132 "seclang-parser.cc" +#line 5131 "seclang-parser.cc" break; case 377: // act: "Redirect" run_time_string @@ -5136,7 +5135,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Redirect(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5140 "seclang-parser.cc" +#line 5139 "seclang-parser.cc" break; case 378: // act: "Rev" @@ -5144,7 +5143,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Rev(yystack_[0].value.as < std::string > ())); } -#line 5148 "seclang-parser.cc" +#line 5147 "seclang-parser.cc" break; case 379: // act: "SanitiseArg" @@ -5152,7 +5151,7 @@ namespace yy { { ACTION_NOT_SUPPORTED("SanitiseArg", yystack_[1].location); } -#line 5156 "seclang-parser.cc" +#line 5155 "seclang-parser.cc" break; case 380: // act: "SanitiseMatched" @@ -5160,7 +5159,7 @@ namespace yy { { ACTION_NOT_SUPPORTED("SanitiseMatched", yystack_[1].location); } -#line 5164 "seclang-parser.cc" +#line 5163 "seclang-parser.cc" break; case 381: // act: "SanitiseMatchedBytes" @@ -5168,7 +5167,7 @@ namespace yy { { ACTION_NOT_SUPPORTED("SanitiseMatchedBytes", yystack_[1].location); } -#line 5172 "seclang-parser.cc" +#line 5171 "seclang-parser.cc" break; case 382: // act: "SanitiseRequestHeader" @@ -5176,7 +5175,7 @@ namespace yy { { ACTION_NOT_SUPPORTED("SanitiseRequestHeader", yystack_[1].location); } -#line 5180 "seclang-parser.cc" +#line 5179 "seclang-parser.cc" break; case 383: // act: "SanitiseResponseHeader" @@ -5184,7 +5183,7 @@ namespace yy { { ACTION_NOT_SUPPORTED("SanitiseResponseHeader", yystack_[1].location); } -#line 5188 "seclang-parser.cc" +#line 5187 "seclang-parser.cc" break; case 384: // act: "SetEnv" run_time_string @@ -5192,7 +5191,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetENV(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5196 "seclang-parser.cc" +#line 5195 "seclang-parser.cc" break; case 385: // act: "SetRsc" run_time_string @@ -5200,7 +5199,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetRSC(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5204 "seclang-parser.cc" +#line 5203 "seclang-parser.cc" break; case 386: // act: "SetSid" run_time_string @@ -5208,7 +5207,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetSID(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5212 "seclang-parser.cc" +#line 5211 "seclang-parser.cc" break; case 387: // act: "SetUID" run_time_string @@ -5216,7 +5215,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetUID(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5220 "seclang-parser.cc" +#line 5219 "seclang-parser.cc" break; case 388: // act: "SetVar" setvar_action @@ -5224,7 +5223,7 @@ namespace yy { { yylhs.value.as < std::unique_ptr > () = std::move(yystack_[0].value.as < std::unique_ptr > ()); } -#line 5228 "seclang-parser.cc" +#line 5227 "seclang-parser.cc" break; case 389: // act: "Severity" @@ -5232,7 +5231,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Severity(yystack_[0].value.as < std::string > ())); } -#line 5236 "seclang-parser.cc" +#line 5235 "seclang-parser.cc" break; case 390: // act: "Skip" @@ -5240,7 +5239,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Skip(yystack_[0].value.as < std::string > ())); } -#line 5244 "seclang-parser.cc" +#line 5243 "seclang-parser.cc" break; case 391: // act: "SkipAfter" @@ -5248,7 +5247,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SkipAfter(yystack_[0].value.as < std::string > ())); } -#line 5252 "seclang-parser.cc" +#line 5251 "seclang-parser.cc" break; case 392: // act: "Status" @@ -5256,7 +5255,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::data::Status(yystack_[0].value.as < std::string > ())); } -#line 5260 "seclang-parser.cc" +#line 5259 "seclang-parser.cc" break; case 393: // act: "Tag" run_time_string @@ -5264,7 +5263,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Tag(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5268 "seclang-parser.cc" +#line 5267 "seclang-parser.cc" break; case 394: // act: "Ver" @@ -5272,7 +5271,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Ver(yystack_[0].value.as < std::string > ())); } -#line 5276 "seclang-parser.cc" +#line 5275 "seclang-parser.cc" break; case 395: // act: "xmlns" @@ -5280,7 +5279,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::XmlNS(yystack_[0].value.as < std::string > ())); } -#line 5284 "seclang-parser.cc" +#line 5283 "seclang-parser.cc" break; case 396: // act: "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" @@ -5288,7 +5287,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityZero7bit()); } -#line 5292 "seclang-parser.cc" +#line 5291 "seclang-parser.cc" break; case 397: // act: "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" @@ -5296,7 +5295,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityOdd7bit()); } -#line 5300 "seclang-parser.cc" +#line 5299 "seclang-parser.cc" break; case 398: // act: "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" @@ -5304,7 +5303,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityEven7bit()); } -#line 5308 "seclang-parser.cc" +#line 5307 "seclang-parser.cc" break; case 399: // act: "ACTION_TRANSFORMATION_SQL_HEX_DECODE" @@ -5312,7 +5311,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::SqlHexDecode()); } -#line 5316 "seclang-parser.cc" +#line 5315 "seclang-parser.cc" break; case 400: // act: "ACTION_TRANSFORMATION_BASE_64_ENCODE" @@ -5320,7 +5319,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64Encode()); } -#line 5324 "seclang-parser.cc" +#line 5323 "seclang-parser.cc" break; case 401: // act: "ACTION_TRANSFORMATION_BASE_64_DECODE" @@ -5328,7 +5327,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64Decode()); } -#line 5332 "seclang-parser.cc" +#line 5331 "seclang-parser.cc" break; case 402: // act: "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" @@ -5336,7 +5335,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64DecodeExt()); } -#line 5340 "seclang-parser.cc" +#line 5339 "seclang-parser.cc" break; case 403: // act: "ACTION_TRANSFORMATION_CMD_LINE" @@ -5344,7 +5343,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CmdLine()); } -#line 5348 "seclang-parser.cc" +#line 5347 "seclang-parser.cc" break; case 404: // act: "ACTION_TRANSFORMATION_SHA1" @@ -5352,7 +5351,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Sha1()); } -#line 5356 "seclang-parser.cc" +#line 5355 "seclang-parser.cc" break; case 405: // act: "ACTION_TRANSFORMATION_MD5" @@ -5360,7 +5359,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Md5()); } -#line 5364 "seclang-parser.cc" +#line 5363 "seclang-parser.cc" break; case 406: // act: "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" @@ -5368,7 +5367,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::EscapeSeqDecode()); } -#line 5372 "seclang-parser.cc" +#line 5371 "seclang-parser.cc" break; case 407: // act: "ACTION_TRANSFORMATION_HEX_ENCODE" @@ -5376,7 +5375,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HexEncode()); } -#line 5380 "seclang-parser.cc" +#line 5379 "seclang-parser.cc" break; case 408: // act: "ACTION_TRANSFORMATION_HEX_DECODE" @@ -5384,7 +5383,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HexDecode()); } -#line 5388 "seclang-parser.cc" +#line 5387 "seclang-parser.cc" break; case 409: // act: "ACTION_TRANSFORMATION_LOWERCASE" @@ -5392,7 +5391,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::LowerCase()); } -#line 5396 "seclang-parser.cc" +#line 5395 "seclang-parser.cc" break; case 410: // act: "ACTION_TRANSFORMATION_PHP_ARGS_NAMES" @@ -5400,7 +5399,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::PhpArgsNames()); } -#line 5404 "seclang-parser.cc" +#line 5403 "seclang-parser.cc" break; case 411: // act: "ACTION_TRANSFORMATION_UPPERCASE" @@ -5408,7 +5407,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UpperCase()); } -#line 5412 "seclang-parser.cc" +#line 5411 "seclang-parser.cc" break; case 412: // act: "ACTION_TRANSFORMATION_URL_DECODE_UNI" @@ -5416,7 +5415,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlDecodeUni()); } -#line 5420 "seclang-parser.cc" +#line 5419 "seclang-parser.cc" break; case 413: // act: "ACTION_TRANSFORMATION_URL_DECODE" @@ -5424,7 +5423,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlDecode()); } -#line 5428 "seclang-parser.cc" +#line 5427 "seclang-parser.cc" break; case 414: // act: "ACTION_TRANSFORMATION_URL_ENCODE" @@ -5432,7 +5431,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlEncode()); } -#line 5436 "seclang-parser.cc" +#line 5435 "seclang-parser.cc" break; case 415: // act: "ACTION_TRANSFORMATION_NONE" @@ -5440,7 +5439,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::None()); } -#line 5444 "seclang-parser.cc" +#line 5443 "seclang-parser.cc" break; case 416: // act: "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" @@ -5448,7 +5447,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CompressWhitespace()); } -#line 5452 "seclang-parser.cc" +#line 5451 "seclang-parser.cc" break; case 417: // act: "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" @@ -5456,7 +5455,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveWhitespace()); } -#line 5460 "seclang-parser.cc" +#line 5459 "seclang-parser.cc" break; case 418: // act: "ACTION_TRANSFORMATION_REPLACE_NULLS" @@ -5464,7 +5463,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ReplaceNulls()); } -#line 5468 "seclang-parser.cc" +#line 5467 "seclang-parser.cc" break; case 419: // act: "ACTION_TRANSFORMATION_REMOVE_NULLS" @@ -5472,7 +5471,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveNulls()); } -#line 5476 "seclang-parser.cc" +#line 5475 "seclang-parser.cc" break; case 420: // act: "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" @@ -5480,7 +5479,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HtmlEntityDecode()); } -#line 5484 "seclang-parser.cc" +#line 5483 "seclang-parser.cc" break; case 421: // act: "ACTION_TRANSFORMATION_JS_DECODE" @@ -5488,7 +5487,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::JsDecode()); } -#line 5492 "seclang-parser.cc" +#line 5491 "seclang-parser.cc" break; case 422: // act: "ACTION_TRANSFORMATION_CSS_DECODE" @@ -5496,7 +5495,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CssDecode()); } -#line 5500 "seclang-parser.cc" +#line 5499 "seclang-parser.cc" break; case 423: // act: "ACTION_TRANSFORMATION_TRIM" @@ -5504,7 +5503,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Trim()); } -#line 5508 "seclang-parser.cc" +#line 5507 "seclang-parser.cc" break; case 424: // act: "ACTION_TRANSFORMATION_TRIM_LEFT" @@ -5512,7 +5511,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::TrimLeft()); } -#line 5516 "seclang-parser.cc" +#line 5515 "seclang-parser.cc" break; case 425: // act: "ACTION_TRANSFORMATION_TRIM_RIGHT" @@ -5520,7 +5519,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::TrimRight()); } -#line 5524 "seclang-parser.cc" +#line 5523 "seclang-parser.cc" break; case 426: // act: "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" @@ -5528,7 +5527,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::NormalisePathWin()); } -#line 5532 "seclang-parser.cc" +#line 5531 "seclang-parser.cc" break; case 427: // act: "ACTION_TRANSFORMATION_NORMALISE_PATH" @@ -5536,7 +5535,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::NormalisePath()); } -#line 5540 "seclang-parser.cc" +#line 5539 "seclang-parser.cc" break; case 428: // act: "ACTION_TRANSFORMATION_LENGTH" @@ -5544,7 +5543,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Length()); } -#line 5548 "seclang-parser.cc" +#line 5547 "seclang-parser.cc" break; case 429: // act: "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" @@ -5552,7 +5551,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Utf8ToUnicode()); } -#line 5556 "seclang-parser.cc" +#line 5555 "seclang-parser.cc" break; case 430: // act: "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" @@ -5560,7 +5559,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveCommentsChar()); } -#line 5564 "seclang-parser.cc" +#line 5563 "seclang-parser.cc" break; case 431: // act: "ACTION_TRANSFORMATION_REMOVE_COMMENTS" @@ -5568,7 +5567,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveComments()); } -#line 5572 "seclang-parser.cc" +#line 5571 "seclang-parser.cc" break; case 432: // act: "ACTION_TRANSFORMATION_REPLACE_COMMENTS" @@ -5576,7 +5575,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ReplaceComments()); } -#line 5580 "seclang-parser.cc" +#line 5579 "seclang-parser.cc" break; case 433: // setvar_action: "NOT" var @@ -5584,7 +5583,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::unsetOperation, std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5588 "seclang-parser.cc" +#line 5587 "seclang-parser.cc" break; case 434: // setvar_action: var @@ -5592,7 +5591,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::setToOneOperation, std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5596 "seclang-parser.cc" +#line 5595 "seclang-parser.cc" break; case 435: // setvar_action: var SETVAR_OPERATION_EQUALS run_time_string @@ -5600,7 +5599,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::setOperation, std::move(yystack_[2].value.as < std::unique_ptr > ()), std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5604 "seclang-parser.cc" +#line 5603 "seclang-parser.cc" break; case 436: // setvar_action: var SETVAR_OPERATION_EQUALS_PLUS run_time_string @@ -5608,7 +5607,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::sumAndSetOperation, std::move(yystack_[2].value.as < std::unique_ptr > ()), std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5612 "seclang-parser.cc" +#line 5611 "seclang-parser.cc" break; case 437: // setvar_action: var SETVAR_OPERATION_EQUALS_MINUS run_time_string @@ -5616,7 +5615,7 @@ namespace yy { { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::substractAndSetOperation, std::move(yystack_[2].value.as < std::unique_ptr > ()), std::move(yystack_[0].value.as < std::unique_ptr > ()))); } -#line 5620 "seclang-parser.cc" +#line 5619 "seclang-parser.cc" break; case 438: // run_time_string: run_time_string "FREE_TEXT_QUOTE_MACRO_EXPANSION" @@ -5625,7 +5624,7 @@ namespace yy { yystack_[1].value.as < std::unique_ptr > ()->appendText(yystack_[0].value.as < std::string > ()); yylhs.value.as < std::unique_ptr > () = std::move(yystack_[1].value.as < std::unique_ptr > ()); } -#line 5629 "seclang-parser.cc" +#line 5628 "seclang-parser.cc" break; case 439: // run_time_string: run_time_string var @@ -5634,7 +5633,7 @@ namespace yy { yystack_[1].value.as < std::unique_ptr > ()->appendVar(std::move(yystack_[0].value.as < std::unique_ptr > ())); yylhs.value.as < std::unique_ptr > () = std::move(yystack_[1].value.as < std::unique_ptr > ()); } -#line 5638 "seclang-parser.cc" +#line 5637 "seclang-parser.cc" break; case 440: // run_time_string: "FREE_TEXT_QUOTE_MACRO_EXPANSION" @@ -5644,7 +5643,7 @@ namespace yy { r->appendText(yystack_[0].value.as < std::string > ()); yylhs.value.as < std::unique_ptr > () = std::move(r); } -#line 5648 "seclang-parser.cc" +#line 5647 "seclang-parser.cc" break; case 441: // run_time_string: var @@ -5654,11 +5653,11 @@ namespace yy { r->appendVar(std::move(yystack_[0].value.as < std::unique_ptr > ())); yylhs.value.as < std::unique_ptr > () = std::move(r); } -#line 5658 "seclang-parser.cc" +#line 5657 "seclang-parser.cc" break; -#line 5662 "seclang-parser.cc" +#line 5661 "seclang-parser.cc" default: break; @@ -7154,43 +7153,43 @@ namespace yy { const short seclang_parser::yyrline_[] = { - 0, 714, 714, 718, 719, 722, 727, 733, 739, 743, - 747, 753, 759, 765, 771, 776, 781, 787, 794, 798, - 802, 808, 812, 816, 821, 826, 831, 836, 840, 847, - 851, 858, 864, 874, 883, 893, 902, 915, 919, 923, - 927, 931, 935, 939, 943, 947, 951, 956, 960, 964, - 968, 972, 976, 981, 986, 990, 994, 998, 1002, 1006, - 1010, 1014, 1018, 1022, 1026, 1030, 1034, 1038, 1042, 1046, - 1050, 1054, 1058, 1062, 1076, 1077, 1109, 1128, 1149, 1179, - 1237, 1244, 1248, 1252, 1256, 1260, 1264, 1268, 1272, 1281, - 1285, 1290, 1293, 1298, 1303, 1308, 1313, 1316, 1321, 1324, - 1329, 1334, 1337, 1342, 1347, 1352, 1357, 1362, 1367, 1372, - 1375, 1380, 1385, 1390, 1395, 1398, 1403, 1408, 1413, 1426, - 1439, 1452, 1465, 1478, 1504, 1532, 1544, 1564, 1591, 1597, - 1602, 1607, 1616, 1621, 1625, 1629, 1633, 1637, 1641, 1645, - 1650, 1655, 1667, 1673, 1677, 1681, 1692, 1701, 1702, 1709, - 1714, 1719, 1773, 1780, 1788, 1825, 1829, 1836, 1841, 1847, - 1853, 1859, 1866, 1876, 1880, 1884, 1888, 1892, 1896, 1900, - 1904, 1908, 1912, 1916, 1920, 1924, 1928, 1932, 1936, 1940, - 1944, 1948, 1952, 1956, 1960, 1964, 1968, 1972, 1976, 1980, - 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020, - 2024, 2028, 2032, 2036, 2040, 2044, 2048, 2052, 2056, 2060, - 2064, 2068, 2072, 2076, 2080, 2084, 2088, 2092, 2096, 2100, - 2104, 2108, 2112, 2116, 2120, 2124, 2128, 2132, 2136, 2140, - 2144, 2148, 2152, 2156, 2160, 2164, 2168, 2172, 2176, 2180, - 2184, 2188, 2192, 2196, 2200, 2204, 2208, 2212, 2216, 2220, - 2224, 2228, 2232, 2237, 2241, 2245, 2250, 2254, 2258, 2263, - 2268, 2272, 2276, 2280, 2284, 2288, 2292, 2296, 2300, 2304, - 2308, 2312, 2316, 2320, 2324, 2328, 2332, 2336, 2340, 2344, - 2348, 2352, 2356, 2360, 2364, 2368, 2372, 2376, 2380, 2384, - 2388, 2392, 2396, 2400, 2404, 2408, 2412, 2416, 2420, 2424, - 2428, 2432, 2436, 2440, 2444, 2448, 2452, 2456, 2460, 2464, - 2468, 2472, 2476, 2480, 2484, 2488, 2492, 2496, 2500, 2504, - 2508, 2516, 2523, 2530, 2537, 2544, 2551, 2558, 2565, 2572, - 2579, 2586, 2593, 2603, 2607, 2611, 2615, 2619, 2623, 2627, - 2631, 2636, 2641, 2646, 2650, 2654, 2658, 2662, 2667, 2672, - 2676, 2680, 2684, 2688, 2692, 2696, 2700, 2704, 2708, 2712, - 2716, 2720, 2724, 2729, 2733, 2737, 2741, 2745, 2749, 2753, + 0, 715, 715, 719, 720, 723, 728, 734, 740, 744, + 748, 754, 760, 766, 772, 777, 782, 788, 795, 799, + 803, 809, 813, 817, 822, 827, 832, 837, 841, 848, + 852, 859, 865, 875, 884, 894, 903, 916, 920, 924, + 928, 932, 936, 940, 944, 948, 952, 957, 961, 965, + 969, 973, 977, 982, 987, 991, 995, 999, 1003, 1007, + 1011, 1015, 1019, 1023, 1027, 1031, 1035, 1039, 1043, 1047, + 1051, 1055, 1059, 1063, 1077, 1078, 1110, 1129, 1150, 1180, + 1238, 1245, 1249, 1253, 1257, 1261, 1265, 1269, 1273, 1282, + 1286, 1291, 1294, 1299, 1304, 1309, 1314, 1317, 1322, 1325, + 1330, 1335, 1338, 1343, 1348, 1353, 1358, 1363, 1368, 1373, + 1376, 1381, 1386, 1391, 1396, 1399, 1404, 1409, 1414, 1427, + 1440, 1453, 1466, 1479, 1505, 1533, 1545, 1565, 1592, 1598, + 1603, 1608, 1617, 1622, 1626, 1630, 1634, 1638, 1642, 1646, + 1651, 1656, 1668, 1674, 1678, 1682, 1693, 1702, 1703, 1710, + 1715, 1720, 1774, 1781, 1789, 1826, 1830, 1837, 1842, 1848, + 1854, 1860, 1867, 1877, 1881, 1885, 1889, 1893, 1897, 1901, + 1905, 1909, 1913, 1917, 1921, 1925, 1929, 1933, 1937, 1941, + 1945, 1949, 1953, 1957, 1961, 1965, 1969, 1973, 1977, 1981, + 1985, 1989, 1993, 1997, 2001, 2005, 2009, 2013, 2017, 2021, + 2025, 2029, 2033, 2037, 2041, 2045, 2049, 2053, 2057, 2061, + 2065, 2069, 2073, 2077, 2081, 2085, 2089, 2093, 2097, 2101, + 2105, 2109, 2113, 2117, 2121, 2125, 2129, 2133, 2137, 2141, + 2145, 2149, 2153, 2157, 2161, 2165, 2169, 2173, 2177, 2181, + 2185, 2189, 2193, 2197, 2201, 2205, 2209, 2213, 2217, 2221, + 2225, 2229, 2233, 2238, 2242, 2246, 2251, 2255, 2259, 2264, + 2269, 2273, 2277, 2281, 2285, 2289, 2293, 2297, 2301, 2305, + 2309, 2313, 2317, 2321, 2325, 2329, 2333, 2337, 2341, 2345, + 2349, 2353, 2357, 2361, 2365, 2369, 2373, 2377, 2381, 2385, + 2389, 2393, 2397, 2401, 2405, 2409, 2413, 2417, 2421, 2425, + 2429, 2433, 2437, 2441, 2445, 2449, 2453, 2457, 2461, 2465, + 2469, 2473, 2477, 2481, 2485, 2489, 2493, 2497, 2501, 2505, + 2509, 2517, 2524, 2531, 2538, 2545, 2552, 2559, 2566, 2573, + 2580, 2587, 2594, 2604, 2608, 2612, 2616, 2620, 2624, 2628, + 2632, 2637, 2642, 2647, 2651, 2655, 2659, 2663, 2668, 2673, + 2677, 2681, 2685, 2689, 2693, 2697, 2701, 2705, 2709, 2713, + 2717, 2721, 2725, 2729, 2733, 2737, 2741, 2745, 2749, 2753, 2757, 2761, 2765, 2769, 2773, 2777, 2781, 2785, 2789, 2793, 2797, 2801, 2805, 2809, 2813, 2817, 2821, 2825, 2829, 2833, 2837, 2841, 2845, 2849, 2853, 2857, 2861, 2865, 2869, 2873, @@ -7230,7 +7229,7 @@ namespace yy { } // yy -#line 7234 "seclang-parser.cc" +#line 7233 "seclang-parser.cc" #line 3058 "seclang-parser.yy" diff --git a/src/parser/seclang-parser.hh b/src/parser/seclang-parser.hh index 0a5f0b3b..d4d7cb0d 100644 --- a/src/parser/seclang-parser.hh +++ b/src/parser/seclang-parser.hh @@ -84,6 +84,7 @@ class Driver; #include "src/actions/disruptive/redirect.h" #include "src/actions/init_col.h" #include "src/actions/exec.h" +#include "src/actions/expire_var.h" #include "src/actions/log_data.h" #include "src/actions/log.h" #include "src/actions/maturity.h" @@ -353,7 +354,7 @@ using namespace modsecurity::operators; a = std::move(c); -#line 357 "seclang-parser.hh" +#line 358 "seclang-parser.hh" # include # include // std::abort @@ -487,7 +488,7 @@ using namespace modsecurity::operators; #endif namespace yy { -#line 491 "seclang-parser.hh" +#line 492 "seclang-parser.hh" @@ -8628,7 +8629,7 @@ switch (yykind) } } // yy -#line 8632 "seclang-parser.hh" +#line 8633 "seclang-parser.hh" diff --git a/src/parser/seclang-parser.yy b/src/parser/seclang-parser.yy index 75b48455..dbbcf45e 100644 --- a/src/parser/seclang-parser.yy +++ b/src/parser/seclang-parser.yy @@ -45,6 +45,7 @@ class Driver; #include "src/actions/disruptive/redirect.h" #include "src/actions/init_col.h" #include "src/actions/exec.h" +#include "src/actions/expire_var.h" #include "src/actions/log_data.h" #include "src/actions/log.h" #include "src/actions/maturity.h" @@ -2723,8 +2724,7 @@ act: } | ACTION_EXPIRE_VAR { - //ACTION_NOT_SUPPORTED("ExpireVar", @0); - ACTION_CONTAINER($$, new actions::Action($1)); + ACTION_CONTAINER($$, new actions::ExpireVar($1)); } | ACTION_ID { diff --git a/src/rule_with_actions.cc b/src/rule_with_actions.cc index 36cdfa72..c9b9a805 100644 --- a/src/rule_with_actions.cc +++ b/src/rule_with_actions.cc @@ -141,12 +141,12 @@ void RuleWithActions::addDefaultAction(std::shared_ptr a) { } else if (dynamic_cast(a.get())) { m_defaultActionActionsTag.push_back(std::dynamic_pointer_cast(a)); } else if (dynamic_cast(a.get())) { - m_defaultActionActionsRuntimePos.push_back(a); + m_defaultActionActionsRuntimePos.push_back(std::dynamic_pointer_cast(a)); m_defaultContainsStaticBlockAction = true; - } else if (std::dynamic_pointer_cast(a) != NULL) { - m_defaultActionDisruptiveAction = a; + } else if (std::dynamic_pointer_cast(a) != NULL) { + m_defaultActionDisruptiveAction = std::dynamic_pointer_cast(a); } else { - m_defaultActionActionsRuntimePos.push_back(a); + m_defaultActionActionsRuntimePos.push_back(std::dynamic_pointer_cast(a)); } } @@ -165,7 +165,6 @@ void RuleWithActions::addAction(actions::Action *a) { return; } - if (dynamic_cast(a)) { m_logData = std::unique_ptr(dynamic_cast(a)); } else if (dynamic_cast(a)) { @@ -176,14 +175,14 @@ void RuleWithActions::addAction(actions::Action *a) { } else if (dynamic_cast(a)) { m_actionsTag.push_back(std::unique_ptr(dynamic_cast(a))); } else if (dynamic_cast(a)) { - m_actionsRuntimePos.push_back(std::unique_ptr(dynamic_cast(a))); + m_actionsRuntimePos.push_back(std::unique_ptr(dynamic_cast(a))); m_containsStaticBlockAction = true; } else if (dynamic_cast(a)) { m_XmlNSs.push_back(std::unique_ptr(dynamic_cast(a))); - } else if (dynamic_cast(a) != NULL) { - m_disruptiveAction = std::unique_ptr(a); + } else if (dynamic_cast(a) != NULL) { + m_disruptiveAction = std::unique_ptr(dynamic_cast(a)); } else { - m_actionsRuntimePos.push_back(std::unique_ptr(a)); + m_actionsRuntimePos.push_back(std::unique_ptr(dynamic_cast(a))); } } @@ -229,12 +228,12 @@ void RuleWithActions::executeActionsAfterFullMatch(Transaction *trans) { if (m_ruleId != b.first) { continue; } - actions::Action *a = dynamic_cast(b.second.get()); - if (dynamic_cast(a)) { + ActionWithExecution *a = dynamic_cast(b.second.get()); + if (dynamic_cast(a)) { trans->messageGetLast()->setRule(this); } executeAction(trans, a, false); - if (dynamic_cast(a)) { + if (dynamic_cast(a)) { disruptiveAlreadyExecuted = true; } } @@ -252,13 +251,12 @@ void RuleWithActions::executeActionsAfterFullMatch(Transaction *trans) { } for (auto &a : getMatchActionsPtr()) { - if (!dynamic_cast(a) + if (!dynamic_cast(a) && !(disruptiveAlreadyExecuted && dynamic_cast(a))) { executeAction(trans, a, false); } } - if (!disruptiveAlreadyExecuted && m_disruptiveAction != nullptr) { executeAction(trans, m_disruptiveAction.get(), false); @@ -271,13 +269,14 @@ void RuleWithActions::executeActionsAfterFullMatch(Transaction *trans) { void RuleWithActions::executeAction(Transaction *trans, - Action *a, bool defaultContext) { - if (dynamic_cast(a) == NULL) { - ms_dbg_a(trans, 9, "Running action: " + *a->getName()); - a->execute(trans); - return; - } + ActionWithExecution *a, bool defaultContext) { + ms_dbg_a(trans, 9, "Running action: " + *a->getName()); + a->execute(trans); +} + +void RuleWithActions::executeAction(Transaction *trans, + ActionDisruptive *a, bool defaultContext) { if (defaultContext && !hasBlockAction()) { ms_dbg_a(trans, 4, "Ignoring action: " + *a->getName() + \ " (rule does not cotains block)"); @@ -285,9 +284,10 @@ void RuleWithActions::executeAction(Transaction *trans, } if (trans->getRuleEngineState() == RulesSet::EnabledRuleEngine) { - ms_dbg_a(trans, 4, "Running (disruptive) action: " + + ms_dbg_a(trans, 4, "Running (disruptive) action: " + \ *a->getName() + "."); - a->execute(trans); + ActionWithExecution *ae = dynamic_cast(a); + ae->execute(trans); return; } diff --git a/src/rule_with_actions.h b/src/rule_with_actions.h index edde2981..7dfd4d5c 100644 --- a/src/rule_with_actions.h +++ b/src/rule_with_actions.h @@ -31,6 +31,8 @@ #include "modsecurity/rule.h" #include "modsecurity/actions/action.h" #include "src/actions/action_type_rule_metadata.h" +#include "src/actions/action_with_execution.h" +#include "src/actions/disruptive/disruptive_action.h" #ifdef __cplusplus @@ -54,15 +56,20 @@ class Transformation; using Transformation = actions::transformations::Transformation; using Transformations = std::vector >; using TransformationsPtr = std::vector; -using Action = actions::Action; -using ActionTypeRuleMetaData = actions::ActionTypeRuleMetaData; + using Actions = std::vector; +using ActionWithExecution = actions::ActionWithExecution; +using ActionTypeRuleMetaData = actions::ActionTypeRuleMetaData; +using ActionDisruptive = actions::disruptive::ActionDisruptive; + +using MatchActions = std::vector >; +using MatchActionsPtr = std::vector; + using Tags = std::vector >; using TagsPtr = std::vector; + using SetVars = std::vector >; using SetVarsPtr = std::vector; -using MatchActions = std::vector >; -using MatchActionsPtr = std::vector; using XmlNSs = std::vector >; using XmlNSsPtr = std::vector; @@ -110,7 +117,6 @@ class RuleWithActions : public Rule { int ACCURACY_NOT_SET = 10; int MATURITY_NOT_SET = 10; - RuleWithActions( Actions *a, Transformations *t, @@ -226,7 +232,11 @@ class RuleWithActions : public Rule { Transaction *trasn); void executeAction(Transaction *trans, - Action *a, + ActionWithExecution *a, + bool context); + + void executeAction(Transaction *trans, + ActionDisruptive *a, bool context); static void executeTransformation( @@ -357,8 +367,8 @@ class RuleWithActions : public Rule { inline bool hasCaptureAction() const { return m_containsCaptureAction || m_defaultContainsCaptureAction; } inline bool hasDisruptiveAction() const { return m_disruptiveAction != nullptr || m_defaultActionDisruptiveAction != nullptr; } - inline void setDisruptiveAction(const std::shared_ptr &a) { m_disruptiveAction = a; } - inline std::shared_ptr getDisruptiveAction() const { return m_disruptiveAction; } + inline void setDisruptiveAction(const std::shared_ptr &a) { m_disruptiveAction = a; } + inline std::shared_ptr getDisruptiveAction() const { return m_disruptiveAction; } inline bool hasBlockAction() const { return m_containsStaticBlockAction || m_defaultContainsStaticBlockAction; } inline void setHasBlockAction(bool b) { m_containsStaticBlockAction = b; } @@ -526,7 +536,7 @@ class RuleWithActions : public Rule { RuleWithActions *m_chainedRuleParent; /* actions */ - std::shared_ptr m_disruptiveAction; + std::shared_ptr m_disruptiveAction; std::shared_ptr m_logData; std::shared_ptr m_msg; MatchActions m_actionsRuntimePos; @@ -535,9 +545,10 @@ class RuleWithActions : public Rule { XmlNSs m_XmlNSs; /* actions || SecDefaultAction */ - std::shared_ptr m_defaultActionDisruptiveAction; + std::shared_ptr m_defaultActionDisruptiveAction; std::shared_ptr m_defaultActionLogData; std::shared_ptr m_defaultActionMsg; + MatchActions m_defaultActionActionsRuntimePos; SetVars m_defaultActionActionsSetVar; Tags m_defaultActionActionsTag;