From 59d4268882d78b2d20ab8042f1ea74eaf8a04c5f Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Tue, 19 Feb 2019 11:08:47 -0300 Subject: [PATCH] Refactoring: renames Rule to RuleWithOperator --- headers/modsecurity/actions/action.h | 2 +- headers/modsecurity/modsecurity.h | 2 +- headers/modsecurity/rule.h | 10 +- headers/modsecurity/rule_message.h | 4 +- headers/modsecurity/rules.h | 6 +- headers/modsecurity/rules_set.h | 2 +- headers/modsecurity/rules_set_phases.h | 5 +- src/actions/capture.h | 2 +- src/actions/chain.h | 2 +- src/actions/disruptive/allow.h | 2 +- src/actions/multi_match.h | 2 +- src/actions/phase.h | 2 +- src/actions/rule_id.h | 2 +- src/actions/set_var.cc | 2 +- src/actions/set_var.h | 2 +- src/operators/begins_with.cc | 2 +- src/operators/begins_with.h | 2 +- src/operators/contains.cc | 2 +- src/operators/contains.h | 2 +- src/operators/contains_word.cc | 2 +- src/operators/contains_word.h | 2 +- src/operators/detect_sqli.cc | 2 +- src/operators/detect_sqli.h | 2 +- src/operators/detect_xss.cc | 2 +- src/operators/detect_xss.h | 2 +- src/operators/ends_with.cc | 2 +- src/operators/ends_with.h | 2 +- src/operators/operator.cc | 4 +- src/operators/operator.h | 8 +- src/operators/pm.cc | 2 +- src/operators/pm.h | 2 +- src/operators/rbl.cc | 2 +- src/operators/rbl.h | 2 +- src/operators/rx.cc | 2 +- src/operators/rx.h | 4 +- src/operators/validate_byte_range.cc | 2 +- src/operators/validate_byte_range.h | 2 +- src/operators/validate_url_encoding.cc | 2 +- src/operators/validate_url_encoding.h | 2 +- src/operators/validate_utf8_encoding.cc | 2 +- src/operators/validate_utf8_encoding.h | 2 +- src/operators/verify_cc.cc | 2 +- src/operators/verify_cc.h | 2 +- src/operators/verify_cpf.cc | 2 +- src/operators/verify_cpf.h | 4 +- src/operators/verify_ssn.cc | 2 +- src/operators/verify_ssn.h | 4 +- src/operators/verify_svnr.cc | 2 +- src/operators/verify_svnr.h | 4 +- src/operators/within.cc | 2 +- src/operators/within.h | 2 +- src/parser/driver.cc | 10 +- src/parser/driver.h | 8 +- src/parser/seclang-parser.cc | 958 ++++++++++++------------ src/parser/seclang-parser.hh | 7 +- src/parser/seclang-parser.yy | 7 +- src/rule.cc | 21 +- src/rule_script.h | 4 +- src/rules_set.cc | 2 +- src/rules_set_phases.cc | 2 +- src/run_time_string.cc | 2 +- src/variables/duration.cc | 2 +- src/variables/duration.h | 2 +- src/variables/env.cc | 2 +- src/variables/env.h | 2 +- src/variables/global.h | 8 +- src/variables/highest_severity.cc | 2 +- src/variables/highest_severity.h | 2 +- src/variables/ip.h | 8 +- src/variables/modsec_build.cc | 2 +- src/variables/modsec_build.h | 2 +- src/variables/remote_user.cc | 2 +- src/variables/remote_user.h | 2 +- src/variables/resource.h | 8 +- src/variables/rule.h | 26 +- src/variables/session.h | 8 +- src/variables/time.cc | 2 +- src/variables/time.h | 2 +- src/variables/time_day.cc | 2 +- src/variables/time_day.h | 2 +- src/variables/time_epoch.cc | 2 +- src/variables/time_epoch.h | 2 +- src/variables/time_hour.cc | 2 +- src/variables/time_hour.h | 2 +- src/variables/time_min.cc | 2 +- src/variables/time_min.h | 2 +- src/variables/time_mon.cc | 2 +- src/variables/time_mon.h | 2 +- src/variables/time_sec.cc | 2 +- src/variables/time_sec.h | 2 +- src/variables/time_wday.cc | 2 +- src/variables/time_wday.h | 2 +- src/variables/time_year.cc | 2 +- src/variables/time_year.h | 2 +- src/variables/tx.h | 8 +- src/variables/user.h | 8 +- src/variables/variable.h | 14 +- src/variables/web_app_id.h | 2 +- src/variables/xml.cc | 4 +- src/variables/xml.h | 6 +- 100 files changed, 657 insertions(+), 655 deletions(-) diff --git a/headers/modsecurity/actions/action.h b/headers/modsecurity/actions/action.h index 7abe072e..08186209 100644 --- a/headers/modsecurity/actions/action.h +++ b/headers/modsecurity/actions/action.h @@ -31,7 +31,7 @@ namespace modsecurity { class Transaction; -class Rule; +class RuleWithOperator; class RuleWithActions; namespace actions { diff --git a/headers/modsecurity/modsecurity.h b/headers/modsecurity/modsecurity.h index 7d9e58d1..83cdfd7e 100644 --- a/headers/modsecurity/modsecurity.h +++ b/headers/modsecurity/modsecurity.h @@ -229,7 +229,7 @@ namespace modsecurity { namespace actions { class Action; } -class Rule; +class RuleWithOperator; #ifdef __cplusplus extern "C" { diff --git a/headers/modsecurity/rule.h b/headers/modsecurity/rule.h index 459a5caa..811c93e5 100644 --- a/headers/modsecurity/rule.h +++ b/headers/modsecurity/rule.h @@ -216,16 +216,16 @@ class RuleWithActions : public RuleBase { }; -class Rule : public RuleWithActions { +class RuleWithOperator : public RuleWithActions { public: - Rule(operators::Operator *op, + RuleWithOperator(operators::Operator *op, variables::Variables *variables, std::vector *actions, Transformations *transformations, std::unique_ptr fileName, int lineNumber); - virtual ~Rule(); + virtual ~RuleWithOperator(); bool evaluate(Transaction *transaction, std::shared_ptr rm) override; @@ -250,8 +250,8 @@ class Rule : public RuleWithActions { return std::to_string(m_ruleId); } - std::unique_ptr m_chainedRuleChild; - Rule *m_chainedRuleParent; + std::unique_ptr m_chainedRuleChild; + RuleWithOperator *m_chainedRuleParent; private: modsecurity::variables::Variables *m_variables; diff --git a/headers/modsecurity/rule_message.h b/headers/modsecurity/rule_message.h index 7a2e9fd9..535c526e 100644 --- a/headers/modsecurity/rule_message.h +++ b/headers/modsecurity/rule_message.h @@ -41,7 +41,7 @@ class RuleMessage { ClientLogMessageInfo = 4 }; - explicit RuleMessage(Rule *rule, Transaction *trans) : + explicit RuleMessage(RuleWithOperator *rule, Transaction *trans) : m_accuracy(rule->m_accuracy), m_clientIpAddress(trans->m_clientIpAddress), m_data(""), @@ -103,7 +103,7 @@ class RuleMessage { int m_phase; std::string m_reference; std::string m_rev; - Rule *m_rule; + RuleWithOperator *m_rule; std::shared_ptr m_ruleFile; int m_ruleId; int m_ruleLine; diff --git a/headers/modsecurity/rules.h b/headers/modsecurity/rules.h index e859dc92..32226044 100644 --- a/headers/modsecurity/rules.h +++ b/headers/modsecurity/rules.h @@ -48,7 +48,7 @@ class Rules { int append(Rules *from, const std::vector &ids, std::ostringstream *err) { size_t j = 0; for (; j < from->size(); j++) { - Rule *rule = dynamic_cast(from->at(j).get()); + RuleWithOperator *rule = dynamic_cast(from->at(j).get()); if (rule && std::binary_search(ids.begin(), ids.end(), rule->m_ruleId)) { if (err != NULL) { *err << "Rule id: " << std::to_string(rule->m_ruleId) \ @@ -66,8 +66,8 @@ class Rules { } bool insert(std::shared_ptr rule, const std::vector *ids, std::ostringstream *err) { - Rule *r = dynamic_cast(rule.get()); - if (ids != nullptr && std::binary_search(ids->begin(), ids->end(), r->m_ruleId)) { + RuleWithOperator *r = dynamic_cast(rule.get()); + if (r && ids != nullptr && std::binary_search(ids->begin(), ids->end(), r->m_ruleId)) { if (err != nullptr) { *err << "Rule id: " << std::to_string(r->m_ruleId) \ << " is duplicated" << std::endl; diff --git a/headers/modsecurity/rules_set.h b/headers/modsecurity/rules_set.h index 4e0766f5..e5870333 100644 --- a/headers/modsecurity/rules_set.h +++ b/headers/modsecurity/rules_set.h @@ -37,7 +37,7 @@ #ifdef __cplusplus namespace modsecurity { -class Rule; +class RuleWithOperator; namespace Parser { class Driver; } diff --git a/headers/modsecurity/rules_set_phases.h b/headers/modsecurity/rules_set_phases.h index ea51f13f..32c05db5 100644 --- a/headers/modsecurity/rules_set_phases.h +++ b/headers/modsecurity/rules_set_phases.h @@ -34,7 +34,10 @@ #ifdef __cplusplus namespace modsecurity { -class Rule; +class RuleWithOperator; +namespace Parser { +class Driver; +} /** @ingroup ModSecurity_CPP_API */ class RulesSetPhases { diff --git a/src/actions/capture.h b/src/actions/capture.h index 20ea1de9..841d1ecb 100644 --- a/src/actions/capture.h +++ b/src/actions/capture.h @@ -22,7 +22,7 @@ namespace modsecurity { -class Rule; +class RuleWithOperator; namespace actions { diff --git a/src/actions/chain.h b/src/actions/chain.h index 411e95e4..6a1532d2 100644 --- a/src/actions/chain.h +++ b/src/actions/chain.h @@ -25,7 +25,7 @@ class Transaction; namespace modsecurity { class Transaction; -class Rule; +class RuleWithOperator; namespace actions { diff --git a/src/actions/disruptive/allow.h b/src/actions/disruptive/allow.h index 11f68cab..de79b205 100644 --- a/src/actions/disruptive/allow.h +++ b/src/actions/disruptive/allow.h @@ -25,7 +25,7 @@ class Transaction; namespace modsecurity { class Transaction; -class Rule; +class RuleWithOperator; namespace actions { namespace disruptive { diff --git a/src/actions/multi_match.h b/src/actions/multi_match.h index f28c2c1b..abab94f8 100644 --- a/src/actions/multi_match.h +++ b/src/actions/multi_match.h @@ -25,7 +25,7 @@ class Transaction; namespace modsecurity { class Transaction; -class Rule; +class RuleWithOperator; namespace actions { diff --git a/src/actions/phase.h b/src/actions/phase.h index 7811851f..c85842e5 100644 --- a/src/actions/phase.h +++ b/src/actions/phase.h @@ -25,7 +25,7 @@ class Transaction; namespace modsecurity { class Transaction; -class Rule; +class RuleWithOperator; namespace actions { diff --git a/src/actions/rule_id.h b/src/actions/rule_id.h index 3e815e74..0a6b3807 100644 --- a/src/actions/rule_id.h +++ b/src/actions/rule_id.h @@ -25,7 +25,7 @@ class Transaction; namespace modsecurity { class Transaction; -class Rule; +class RuleWithOperator; namespace actions { diff --git a/src/actions/set_var.cc b/src/actions/set_var.cc index 4cd57fe9..c9f7f665 100644 --- a/src/actions/set_var.cc +++ b/src/actions/set_var.cc @@ -112,7 +112,7 @@ bool SetVar::evaluate(RuleWithActions *rule, Transaction *t) { try { std::vector l; - Rule *rr = dynamic_cast(rule); + RuleWithOperator *rr = dynamic_cast(rule); m_variable->evaluate(t, rr, &l); if (l.size() == 0) { value = 0; diff --git a/src/actions/set_var.h b/src/actions/set_var.h index de3fb98b..22905a8c 100644 --- a/src/actions/set_var.h +++ b/src/actions/set_var.h @@ -25,7 +25,7 @@ namespace modsecurity { class Transaction; -class Rule; +class RuleWithOperator; namespace actions { diff --git a/src/operators/begins_with.cc b/src/operators/begins_with.cc index 86d0cc08..b1719971 100644 --- a/src/operators/begins_with.cc +++ b/src/operators/begins_with.cc @@ -24,7 +24,7 @@ namespace modsecurity { namespace operators { -bool BeginsWith::evaluate(Transaction *transaction, Rule *rule, +bool BeginsWith::evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) { std::string p(m_string->evaluate(transaction)); diff --git a/src/operators/begins_with.h b/src/operators/begins_with.h index 56304c58..10a85de3 100644 --- a/src/operators/begins_with.h +++ b/src/operators/begins_with.h @@ -32,7 +32,7 @@ class BeginsWith : public Operator { explicit BeginsWith(std::unique_ptr param) : Operator("BeginsWith", std::move(param)) { } - bool evaluate(Transaction *transaction, Rule *rule, const std::string &str, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) override; }; diff --git a/src/operators/contains.cc b/src/operators/contains.cc index 922ee8cc..a32f768e 100644 --- a/src/operators/contains.cc +++ b/src/operators/contains.cc @@ -21,7 +21,7 @@ namespace modsecurity { namespace operators { -bool Contains::evaluate(Transaction *transaction, Rule *rule, +bool Contains::evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &input, std::shared_ptr ruleMessage) { std::string p(m_string->evaluate(transaction)); size_t offset = input.find(p); diff --git a/src/operators/contains.h b/src/operators/contains.h index 12b6c02c..283e2e54 100644 --- a/src/operators/contains.h +++ b/src/operators/contains.h @@ -34,7 +34,7 @@ class Contains : public Operator { /** @ingroup ModSecurity_Operator */ explicit Contains(std::unique_ptr param) : Operator("Contains", std::move(param)) { } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) override; }; diff --git a/src/operators/contains_word.cc b/src/operators/contains_word.cc index fc66d3e5..4664b4b3 100644 --- a/src/operators/contains_word.cc +++ b/src/operators/contains_word.cc @@ -36,7 +36,7 @@ bool ContainsWord::acceptableChar(const std::string& a, size_t pos) { return true; } -bool ContainsWord::evaluate(Transaction *transaction, Rule *rule, +bool ContainsWord::evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) { std::string paramTarget(m_string->evaluate(transaction)); diff --git a/src/operators/contains_word.h b/src/operators/contains_word.h index d2bc9fca..8106bff6 100644 --- a/src/operators/contains_word.h +++ b/src/operators/contains_word.h @@ -32,7 +32,7 @@ class ContainsWord : public Operator { explicit ContainsWord(std::unique_ptr param) : Operator("ContainsWord", std::move(param)) { } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) override; diff --git a/src/operators/detect_sqli.cc b/src/operators/detect_sqli.cc index 22af2509..81144d26 100644 --- a/src/operators/detect_sqli.cc +++ b/src/operators/detect_sqli.cc @@ -25,7 +25,7 @@ namespace modsecurity { namespace operators { -bool DetectSQLi::evaluate(Transaction *t, Rule *rule, +bool DetectSQLi::evaluate(Transaction *t, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) { char fingerprint[8]; int issqli; diff --git a/src/operators/detect_sqli.h b/src/operators/detect_sqli.h index c07eac53..6bf50c91 100644 --- a/src/operators/detect_sqli.h +++ b/src/operators/detect_sqli.h @@ -32,7 +32,7 @@ class DetectSQLi : public Operator { m_match_message.assign("detected SQLi using libinjection."); } - bool evaluate(Transaction *t, Rule *rule, + bool evaluate(Transaction *t, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) override; }; diff --git a/src/operators/detect_xss.cc b/src/operators/detect_xss.cc index 9661c455..788d18b8 100644 --- a/src/operators/detect_xss.cc +++ b/src/operators/detect_xss.cc @@ -25,7 +25,7 @@ namespace modsecurity { namespace operators { -bool DetectXSS::evaluate(Transaction *t, Rule *rule, +bool DetectXSS::evaluate(Transaction *t, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) { int is_xss; diff --git a/src/operators/detect_xss.h b/src/operators/detect_xss.h index a15cff27..22f0e2ca 100644 --- a/src/operators/detect_xss.h +++ b/src/operators/detect_xss.h @@ -31,7 +31,7 @@ class DetectXSS : public Operator { m_match_message.assign("detected XSS using libinjection."); } - bool evaluate(Transaction *t, Rule *rule, + bool evaluate(Transaction *t, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) override; }; diff --git a/src/operators/ends_with.cc b/src/operators/ends_with.cc index ed5ec52d..96d4cadf 100644 --- a/src/operators/ends_with.cc +++ b/src/operators/ends_with.cc @@ -23,7 +23,7 @@ namespace modsecurity { namespace operators { -bool EndsWith::evaluate(Transaction *transaction, Rule *rule, +bool EndsWith::evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) { bool ret = false; std::string p(m_string->evaluate(transaction)); diff --git a/src/operators/ends_with.h b/src/operators/ends_with.h index cef070d5..2da09876 100644 --- a/src/operators/ends_with.h +++ b/src/operators/ends_with.h @@ -33,7 +33,7 @@ class EndsWith : public Operator { : Operator("EndsWith", std::move(param)) { m_couldContainsMacro = true; } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) override; }; diff --git a/src/operators/operator.cc b/src/operators/operator.cc index 838c9d83..c1375188 100644 --- a/src/operators/operator.cc +++ b/src/operators/operator.cc @@ -70,7 +70,7 @@ namespace operators { bool Operator::evaluateInternal(Transaction *transaction, - Rule *rule, const std::string& a, std::shared_ptr rm) { + RuleWithOperator *rule, const std::string& a, std::shared_ptr rm) { bool res = evaluate(transaction, rule, a, rm); if (m_negation) { @@ -81,7 +81,7 @@ bool Operator::evaluateInternal(Transaction *transaction, } bool Operator::evaluateInternal(Transaction *transaction, - Rule *rule, const std::string& a) { + RuleWithOperator *rule, const std::string& a) { bool res = evaluate(transaction, rule, a); if (m_negation) { diff --git a/src/operators/operator.h b/src/operators/operator.h index 01e0ac30..1ced33d0 100644 --- a/src/operators/operator.h +++ b/src/operators/operator.h @@ -111,18 +111,18 @@ class Operator { std::string key, std::string value); bool evaluateInternal(Transaction *t, const std::string& a); - bool evaluateInternal(Transaction *t, Rule *rule, + bool evaluateInternal(Transaction *t, RuleWithOperator *rule, const std::string& a); - bool evaluateInternal(Transaction *t, Rule *rule, + bool evaluateInternal(Transaction *t, RuleWithOperator *rule, const std::string& a, std::shared_ptr ruleMessage); virtual bool evaluate(Transaction *transaction, const std::string &str); - virtual bool evaluate(Transaction *transaction, Rule *rule, + virtual bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str) { return evaluate(transaction, str); } - virtual bool evaluate(Transaction *transaction, Rule *rule, + virtual bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) { return evaluate(transaction, str); } diff --git a/src/operators/pm.cc b/src/operators/pm.cc index 432dad78..76b429d7 100644 --- a/src/operators/pm.cc +++ b/src/operators/pm.cc @@ -81,7 +81,7 @@ void Pm::postOrderTraversal(acmp_btree_node_t *node) { } -bool Pm::evaluate(Transaction *transaction, Rule *rule, +bool Pm::evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &input, std::shared_ptr ruleMessage) { int rc; ACMPT pt; diff --git a/src/operators/pm.h b/src/operators/pm.h index a1dfaa1f..d4531851 100644 --- a/src/operators/pm.h +++ b/src/operators/pm.h @@ -41,7 +41,7 @@ class Pm : public Operator { m_p = acmp_create(0); } ~Pm(); - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) override; diff --git a/src/operators/rbl.cc b/src/operators/rbl.cc index d5de12ce..d8a86ac9 100644 --- a/src/operators/rbl.cc +++ b/src/operators/rbl.cc @@ -200,7 +200,7 @@ void Rbl::furtherInfo(struct sockaddr_in *sin, const std::string &ipStr, } -bool Rbl::evaluate(Transaction *t, Rule *rule, +bool Rbl::evaluate(Transaction *t, RuleWithOperator *rule, const std::string& ipStr, std::shared_ptr ruleMessage) { struct addrinfo *info = NULL; diff --git a/src/operators/rbl.h b/src/operators/rbl.h index 99ac2754..7a1fd89a 100644 --- a/src/operators/rbl.h +++ b/src/operators/rbl.h @@ -76,7 +76,7 @@ class Rbl : public Operator { m_provider = RblProvider::httpbl; } } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) override; diff --git a/src/operators/rx.cc b/src/operators/rx.cc index 2010d80c..f13be151 100644 --- a/src/operators/rx.cc +++ b/src/operators/rx.cc @@ -36,7 +36,7 @@ bool Rx::init(const std::string &arg, std::string *error) { } -bool Rx::evaluate(Transaction *transaction, Rule *rule, +bool Rx::evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) { std::list matches; Regex *re; diff --git a/src/operators/rx.h b/src/operators/rx.h index 2d97b084..e9ea78fc 100644 --- a/src/operators/rx.h +++ b/src/operators/rx.h @@ -49,7 +49,7 @@ class Rx : public Operator { } } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &input) override { return evaluate(transaction, NULL, input, NULL); } @@ -57,7 +57,7 @@ class Rx : public Operator { const std::string &input) override { return evaluate(transaction, NULL, input); } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) override; diff --git a/src/operators/validate_byte_range.cc b/src/operators/validate_byte_range.cc index 34714e55..cef63725 100644 --- a/src/operators/validate_byte_range.cc +++ b/src/operators/validate_byte_range.cc @@ -110,7 +110,7 @@ bool ValidateByteRange::init(const std::string &file, } -bool ValidateByteRange::evaluate(Transaction *transaction, Rule *rule, +bool ValidateByteRange::evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &input, std::shared_ptr ruleMessage) { bool ret = true; diff --git a/src/operators/validate_byte_range.h b/src/operators/validate_byte_range.h index 73174a1a..7667f329 100644 --- a/src/operators/validate_byte_range.h +++ b/src/operators/validate_byte_range.h @@ -37,7 +37,7 @@ class ValidateByteRange : public Operator { } ~ValidateByteRange() override { } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &input, std::shared_ptr ruleMessage) override; bool getRange(const std::string &rangeRepresentation, std::string *error); diff --git a/src/operators/validate_url_encoding.cc b/src/operators/validate_url_encoding.cc index ec13e629..a9110663 100644 --- a/src/operators/validate_url_encoding.cc +++ b/src/operators/validate_url_encoding.cc @@ -68,7 +68,7 @@ int ValidateUrlEncoding::validate_url_encoding(const char *input, } -bool ValidateUrlEncoding::evaluate(Transaction *transaction, Rule *rule, +bool ValidateUrlEncoding::evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &input, std::shared_ptr ruleMessage) { size_t offset = 0; bool res = false; diff --git a/src/operators/validate_url_encoding.h b/src/operators/validate_url_encoding.h index c7d48ab4..52b51d73 100644 --- a/src/operators/validate_url_encoding.h +++ b/src/operators/validate_url_encoding.h @@ -31,7 +31,7 @@ class ValidateUrlEncoding : public Operator { ValidateUrlEncoding() : Operator("ValidateUrlEncoding") { } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &input, std::shared_ptr ruleMessage) override; diff --git a/src/operators/validate_utf8_encoding.cc b/src/operators/validate_utf8_encoding.cc index 71b2f2f7..2ef23fbb 100644 --- a/src/operators/validate_utf8_encoding.cc +++ b/src/operators/validate_utf8_encoding.cc @@ -113,7 +113,7 @@ int ValidateUtf8Encoding::detect_utf8_character( return unicode_len; } -bool ValidateUtf8Encoding::evaluate(Transaction *transaction, Rule *rule, +bool ValidateUtf8Encoding::evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) { unsigned int i, bytes_left; diff --git a/src/operators/validate_utf8_encoding.h b/src/operators/validate_utf8_encoding.h index 42448a79..376212c2 100644 --- a/src/operators/validate_utf8_encoding.h +++ b/src/operators/validate_utf8_encoding.h @@ -38,7 +38,7 @@ class ValidateUtf8Encoding : public Operator { ValidateUtf8Encoding() : Operator("ValidateUtf8Encoding") { } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) override; diff --git a/src/operators/verify_cc.cc b/src/operators/verify_cc.cc index 81af9fb2..c121c474 100644 --- a/src/operators/verify_cc.cc +++ b/src/operators/verify_cc.cc @@ -117,7 +117,7 @@ bool VerifyCC::init(const std::string ¶m2, std::string *error) { } -bool VerifyCC::evaluate(Transaction *t, Rule *rule, +bool VerifyCC::evaluate(Transaction *t, RuleWithOperator *rule, const std::string& i, std::shared_ptr ruleMessage) { int offset = 0; int target_length = i.length(); diff --git a/src/operators/verify_cc.h b/src/operators/verify_cc.h index cea5f5ea..d9ad9414 100644 --- a/src/operators/verify_cc.h +++ b/src/operators/verify_cc.h @@ -35,7 +35,7 @@ class VerifyCC : public Operator { m_pce(NULL) { } ~VerifyCC(); - bool evaluate(Transaction *t, Rule *rule, + bool evaluate(Transaction *t, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) override; bool init(const std::string ¶m, std::string *error) override; diff --git a/src/operators/verify_cpf.cc b/src/operators/verify_cpf.cc index b1ea5f17..03a1fe02 100644 --- a/src/operators/verify_cpf.cc +++ b/src/operators/verify_cpf.cc @@ -108,7 +108,7 @@ bool VerifyCPF::verify(const char *cpfnumber, int len) { } -bool VerifyCPF::evaluate(Transaction *t, Rule *rule, +bool VerifyCPF::evaluate(Transaction *t, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) { std::list matches; bool is_cpf = false; diff --git a/src/operators/verify_cpf.h b/src/operators/verify_cpf.h index b4d30d66..83dc03d2 100644 --- a/src/operators/verify_cpf.h +++ b/src/operators/verify_cpf.h @@ -46,7 +46,7 @@ class VerifyCPF : public Operator { bool operator=(const VerifyCPF &a) = delete; VerifyCPF(const VerifyCPF &a) = delete; - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &input) override { return evaluate(transaction, NULL, input, NULL); } @@ -54,7 +54,7 @@ class VerifyCPF : public Operator { const std::string &input) override { return evaluate(transaction, NULL, input); } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) override; diff --git a/src/operators/verify_ssn.cc b/src/operators/verify_ssn.cc index c945e06d..775fc58d 100644 --- a/src/operators/verify_ssn.cc +++ b/src/operators/verify_ssn.cc @@ -110,7 +110,7 @@ invalid: } -bool VerifySSN::evaluate(Transaction *t, Rule *rule, +bool VerifySSN::evaluate(Transaction *t, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) { std::list matches; bool is_ssn = false; diff --git a/src/operators/verify_ssn.h b/src/operators/verify_ssn.h index 64837c57..8fe47bdf 100644 --- a/src/operators/verify_ssn.h +++ b/src/operators/verify_ssn.h @@ -46,7 +46,7 @@ class VerifySSN : public Operator { bool operator=(const VerifySSN &a) = delete; VerifySSN(const VerifySSN &a) = delete; - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &input) override { return evaluate(transaction, NULL, input, NULL); } @@ -54,7 +54,7 @@ class VerifySSN : public Operator { const std::string &input) override { return evaluate(transaction, NULL, input); } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) override; diff --git a/src/operators/verify_svnr.cc b/src/operators/verify_svnr.cc index 30a7d565..5b89d2fe 100644 --- a/src/operators/verify_svnr.cc +++ b/src/operators/verify_svnr.cc @@ -77,7 +77,7 @@ bool VerifySVNR::verify(const char *svnrnumber, int len) { } -bool VerifySVNR::evaluate(Transaction *t, Rule *rule, +bool VerifySVNR::evaluate(Transaction *t, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) { std::list matches; bool is_svnr = false; diff --git a/src/operators/verify_svnr.h b/src/operators/verify_svnr.h index ce04185a..d608bdf5 100644 --- a/src/operators/verify_svnr.h +++ b/src/operators/verify_svnr.h @@ -32,7 +32,7 @@ class VerifySVNR : public Operator { bool operator=(const VerifySVNR &a) = delete; VerifySVNR(const VerifySVNR &a) = delete; - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &input) override { return evaluate(transaction, NULL, input, NULL); } @@ -40,7 +40,7 @@ class VerifySVNR : public Operator { const std::string &input) override { return evaluate(transaction, NULL, input); } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string& input, std::shared_ptr ruleMessage) override; diff --git a/src/operators/within.cc b/src/operators/within.cc index 70edac75..86b0bc3d 100644 --- a/src/operators/within.cc +++ b/src/operators/within.cc @@ -24,7 +24,7 @@ namespace modsecurity { namespace operators { -bool Within::evaluate(Transaction *transaction, Rule *rule, +bool Within::evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) { bool res = false; size_t pos = 0; diff --git a/src/operators/within.h b/src/operators/within.h index fdcc55d4..36ebe9b4 100644 --- a/src/operators/within.h +++ b/src/operators/within.h @@ -33,7 +33,7 @@ class Within : public Operator { : Operator("Within", std::move(param)) { m_couldContainsMacro = true; } - bool evaluate(Transaction *transaction, Rule *rule, + bool evaluate(Transaction *transaction, RuleWithOperator *rule, const std::string &str, std::shared_ptr ruleMessage) override; }; diff --git a/src/parser/driver.cc b/src/parser/driver.cc index 8eb9c28b..b13396b4 100644 --- a/src/parser/driver.cc +++ b/src/parser/driver.cc @@ -20,7 +20,7 @@ #include "modsecurity/audit_log.h" using modsecurity::audit_log::AuditLog; -using modsecurity::Rule; +using modsecurity::RuleWithOperator; namespace modsecurity { namespace Parser { @@ -53,7 +53,7 @@ int Driver::addSecMarker(std::string marker, std::unique_ptr fileNa } -int Driver::addSecAction(std::unique_ptr rule) { +int Driver::addSecAction(std::unique_ptr rule) { if (rule->getPhase() >= modsecurity::Phases::NUMBER_OF_PHASES) { m_parserError << "Unknown phase: " << std::to_string(rule->getPhase()); m_parserError << std::endl; @@ -72,7 +72,7 @@ int Driver::addSecRuleScript(std::unique_ptr rule) { } -int Driver::addSecRule(std::unique_ptr r) { +int Driver::addSecRule(std::unique_ptr r) { if (r->getPhase() >= modsecurity::Phases::NUMBER_OF_PHASES) { m_parserError << "Unknown phase: " << std::to_string(r->getPhase()); m_parserError << std::endl; @@ -93,7 +93,7 @@ int Driver::addSecRule(std::unique_ptr r) { return true; } - std::shared_ptr rule(std::move(r)); + std::shared_ptr rule(std::move(r)); /* * Checking if the rule has an ID and also checking if this ID is not used * by other rule @@ -108,7 +108,7 @@ int Driver::addSecRule(std::unique_ptr r) { for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) { Rules *rules = m_rulesSetPhases[i]; for (int j = 0; j < rules->size(); j++) { - Rule *lr = dynamic_cast(rules->at(j).get()); + RuleWithOperator *lr = dynamic_cast(rules->at(j).get()); if (lr && lr->m_ruleId == rule->m_ruleId) { m_parserError << "Rule id: " << std::to_string(rule->m_ruleId) \ << " is duplicated" << std::endl; diff --git a/src/parser/driver.h b/src/parser/driver.h index 150ed1cc..6fbcd006 100644 --- a/src/parser/driver.h +++ b/src/parser/driver.h @@ -34,7 +34,7 @@ #include "src/parser/seclang-parser.hh" #endif -using modsecurity::Rule; +using modsecurity::RuleWithOperator; using modsecurity::RulesSet; @@ -66,8 +66,8 @@ class Driver : public RulesSetProperties { Driver(); virtual ~Driver(); - int addSecRule(std::unique_ptr rule); - int addSecAction(std::unique_ptr rule); + int addSecRule(std::unique_ptr rule); + int addSecAction(std::unique_ptr rule); int addSecMarker(std::string marker, std::unique_ptr fileName, int lineNumber); int addSecRuleScript(std::unique_ptr rule); @@ -89,7 +89,7 @@ class Driver : public RulesSetProperties { std::list loc; std::string buffer; - Rule *m_lastRule; + RuleWithOperator *m_lastRule; RulesSetPhases m_rulesSetPhases; }; diff --git a/src/parser/seclang-parser.cc b/src/parser/seclang-parser.cc index 796d809b..bc5297bc 100644 --- a/src/parser/seclang-parser.cc +++ b/src/parser/seclang-parser.cc @@ -41,7 +41,7 @@ // Unqualified %code blocks. -#line 324 "seclang-parser.yy" +#line 323 "seclang-parser.yy" #include "src/parser/driver.h" @@ -1356,7 +1356,7 @@ namespace yy { // User initialization code. -#line 317 "seclang-parser.yy" +#line 316 "seclang-parser.yy" { // Initialize the initial location. yyla.location.begin.filename = yyla.location.end.filename = new std::string(driver.file); @@ -1716,7 +1716,7 @@ namespace yy { switch (yyn) { case 2: -#line 709 "seclang-parser.yy" +#line 708 "seclang-parser.yy" { return 0; } @@ -1724,7 +1724,7 @@ namespace yy { break; case 6: -#line 722 "seclang-parser.yy" +#line 721 "seclang-parser.yy" { driver.m_auditLog->setStorageDirMode(strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 8)); } @@ -1732,7 +1732,7 @@ namespace yy { break; case 7: -#line 728 "seclang-parser.yy" +#line 727 "seclang-parser.yy" { driver.m_auditLog->setStorageDir(yystack_[0].value.as < std::string > ()); } @@ -1740,7 +1740,7 @@ namespace yy { break; case 8: -#line 734 "seclang-parser.yy" +#line 733 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::RelevantOnlyAuditLogStatus); } @@ -1748,7 +1748,7 @@ namespace yy { break; case 9: -#line 738 "seclang-parser.yy" +#line 737 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::OffAuditLogStatus); } @@ -1756,7 +1756,7 @@ namespace yy { break; case 10: -#line 742 "seclang-parser.yy" +#line 741 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::OnAuditLogStatus); } @@ -1764,7 +1764,7 @@ namespace yy { break; case 11: -#line 748 "seclang-parser.yy" +#line 747 "seclang-parser.yy" { driver.m_auditLog->setFileMode(strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 8)); } @@ -1772,7 +1772,7 @@ namespace yy { break; case 12: -#line 754 "seclang-parser.yy" +#line 753 "seclang-parser.yy" { driver.m_auditLog->setFilePath2(yystack_[0].value.as < std::string > ()); } @@ -1780,7 +1780,7 @@ namespace yy { break; case 13: -#line 760 "seclang-parser.yy" +#line 759 "seclang-parser.yy" { driver.m_auditLog->setParts(yystack_[0].value.as < std::string > ()); } @@ -1788,7 +1788,7 @@ namespace yy { break; case 14: -#line 766 "seclang-parser.yy" +#line 765 "seclang-parser.yy" { driver.m_auditLog->setFilePath1(yystack_[0].value.as < std::string > ()); } @@ -1796,7 +1796,7 @@ namespace yy { break; case 15: -#line 771 "seclang-parser.yy" +#line 770 "seclang-parser.yy" { driver.m_auditLog->setFormat(modsecurity::audit_log::AuditLog::JSONAuditLogFormat); } @@ -1804,7 +1804,7 @@ namespace yy { break; case 16: -#line 776 "seclang-parser.yy" +#line 775 "seclang-parser.yy" { driver.m_auditLog->setFormat(modsecurity::audit_log::AuditLog::NativeAuditLogFormat); } @@ -1812,7 +1812,7 @@ namespace yy { break; case 17: -#line 782 "seclang-parser.yy" +#line 781 "seclang-parser.yy" { std::string relevant_status(yystack_[0].value.as < std::string > ()); driver.m_auditLog->setRelevantStatus(relevant_status); @@ -1821,7 +1821,7 @@ namespace yy { break; case 18: -#line 789 "seclang-parser.yy" +#line 788 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::SerialAuditLogType); } @@ -1829,7 +1829,7 @@ namespace yy { break; case 19: -#line 793 "seclang-parser.yy" +#line 792 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::ParallelAuditLogType); } @@ -1837,7 +1837,7 @@ namespace yy { break; case 20: -#line 797 "seclang-parser.yy" +#line 796 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::HttpsAuditLogType); } @@ -1845,7 +1845,7 @@ namespace yy { break; case 21: -#line 803 "seclang-parser.yy" +#line 802 "seclang-parser.yy" { driver.m_uploadKeepFiles = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -1853,7 +1853,7 @@ namespace yy { break; case 22: -#line 807 "seclang-parser.yy" +#line 806 "seclang-parser.yy" { driver.m_uploadKeepFiles = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -1861,7 +1861,7 @@ namespace yy { break; case 23: -#line 811 "seclang-parser.yy" +#line 810 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecUploadKeepFiles RelevantOnly is not currently supported. Accepted values are On or Off"); YYERROR; @@ -1870,7 +1870,7 @@ namespace yy { break; case 24: -#line 816 "seclang-parser.yy" +#line 815 "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); @@ -1879,7 +1879,7 @@ namespace yy { break; case 25: -#line 821 "seclang-parser.yy" +#line 820 "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); @@ -1888,7 +1888,7 @@ namespace yy { break; case 26: -#line 826 "seclang-parser.yy" +#line 825 "seclang-parser.yy" { driver.m_uploadDirectory.m_set = true; driver.m_uploadDirectory.m_value = yystack_[0].value.as < std::string > (); @@ -1897,7 +1897,7 @@ namespace yy { break; case 27: -#line 831 "seclang-parser.yy" +#line 830 "seclang-parser.yy" { driver.m_tmpSaveUploadedFiles = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -1905,7 +1905,7 @@ namespace yy { break; case 28: -#line 835 "seclang-parser.yy" +#line 834 "seclang-parser.yy" { driver.m_tmpSaveUploadedFiles = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -1913,7 +1913,7 @@ namespace yy { break; case 29: -#line 842 "seclang-parser.yy" +#line 841 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[1].value.as < std::unique_ptr > > > ()); } @@ -1921,7 +1921,7 @@ namespace yy { break; case 30: -#line 846 "seclang-parser.yy" +#line 845 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); } @@ -1929,7 +1929,7 @@ namespace yy { break; case 31: -#line 853 "seclang-parser.yy" +#line 852 "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 > ())); @@ -1939,7 +1939,7 @@ namespace yy { break; case 32: -#line 859 "seclang-parser.yy" +#line 858 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); ACTION_INIT(yystack_[0].value.as < std::unique_ptr > (), yystack_[1].location) @@ -1950,7 +1950,7 @@ namespace yy { break; case 33: -#line 869 "seclang-parser.yy" +#line 868 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > () = std::move(yystack_[0].value.as < std::unique_ptr > ()); std::string error; @@ -1963,7 +1963,7 @@ namespace yy { break; case 34: -#line 878 "seclang-parser.yy" +#line 877 "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; @@ -1977,7 +1977,7 @@ namespace yy { break; case 35: -#line 888 "seclang-parser.yy" +#line 887 "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; @@ -1990,7 +1990,7 @@ namespace yy { break; case 36: -#line 897 "seclang-parser.yy" +#line 896 "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; @@ -2004,7 +2004,7 @@ namespace yy { break; case 37: -#line 910 "seclang-parser.yy" +#line 909 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::UnconditionalMatch()); } @@ -2012,7 +2012,7 @@ namespace yy { break; case 38: -#line 914 "seclang-parser.yy" +#line 913 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::DetectSQLi()); } @@ -2020,7 +2020,7 @@ namespace yy { break; case 39: -#line 918 "seclang-parser.yy" +#line 917 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::DetectXSS()); } @@ -2028,7 +2028,7 @@ namespace yy { break; case 40: -#line 922 "seclang-parser.yy" +#line 921 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateUrlEncoding()); } @@ -2036,7 +2036,7 @@ namespace yy { break; case 41: -#line 926 "seclang-parser.yy" +#line 925 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateUtf8Encoding()); } @@ -2044,7 +2044,7 @@ namespace yy { break; case 42: -#line 930 "seclang-parser.yy" +#line 929 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::InspectFile(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2052,7 +2052,7 @@ namespace yy { break; case 43: -#line 934 "seclang-parser.yy" +#line 933 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::FuzzyHash(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2060,7 +2060,7 @@ namespace yy { break; case 44: -#line 938 "seclang-parser.yy" +#line 937 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateByteRange(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2068,7 +2068,7 @@ namespace yy { break; case 45: -#line 942 "seclang-parser.yy" +#line 941 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateDTD(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2076,7 +2076,7 @@ namespace yy { break; case 46: -#line 946 "seclang-parser.yy" +#line 945 "seclang-parser.yy" { /* $$ = new operators::ValidateHash($1); */ OPERATOR_NOT_SUPPORTED("ValidateHash", yystack_[2].location); @@ -2085,7 +2085,7 @@ namespace yy { break; case 47: -#line 951 "seclang-parser.yy" +#line 950 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateSchema(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2093,7 +2093,7 @@ namespace yy { break; case 48: -#line 955 "seclang-parser.yy" +#line 954 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifyCC(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2101,7 +2101,7 @@ namespace yy { break; case 49: -#line 959 "seclang-parser.yy" +#line 958 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifyCPF(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2109,7 +2109,7 @@ namespace yy { break; case 50: -#line 963 "seclang-parser.yy" +#line 962 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifySSN(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2117,7 +2117,7 @@ namespace yy { break; case 51: -#line 967 "seclang-parser.yy" +#line 966 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifySVNR(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2125,7 +2125,7 @@ namespace yy { break; case 52: -#line 971 "seclang-parser.yy" +#line 970 "seclang-parser.yy" { /* $$ = new operators::GsbLookup($1); */ OPERATOR_NOT_SUPPORTED("GsbLookup", yystack_[2].location); @@ -2134,7 +2134,7 @@ namespace yy { break; case 53: -#line 976 "seclang-parser.yy" +#line 975 "seclang-parser.yy" { /* $$ = new operators::Rsub($1); */ OPERATOR_NOT_SUPPORTED("Rsub", yystack_[2].location); @@ -2143,7 +2143,7 @@ namespace yy { break; case 54: -#line 981 "seclang-parser.yy" +#line 980 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Within(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2151,7 +2151,7 @@ namespace yy { break; case 55: -#line 985 "seclang-parser.yy" +#line 984 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ContainsWord(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2159,7 +2159,7 @@ namespace yy { break; case 56: -#line 989 "seclang-parser.yy" +#line 988 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Contains(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2167,7 +2167,7 @@ namespace yy { break; case 57: -#line 993 "seclang-parser.yy" +#line 992 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::EndsWith(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2175,7 +2175,7 @@ namespace yy { break; case 58: -#line 997 "seclang-parser.yy" +#line 996 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Eq(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2183,7 +2183,7 @@ namespace yy { break; case 59: -#line 1001 "seclang-parser.yy" +#line 1000 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Ge(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2191,7 +2191,7 @@ namespace yy { break; case 60: -#line 1005 "seclang-parser.yy" +#line 1004 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Gt(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2199,7 +2199,7 @@ namespace yy { break; case 61: -#line 1009 "seclang-parser.yy" +#line 1008 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::IpMatchF(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2207,7 +2207,7 @@ namespace yy { break; case 62: -#line 1013 "seclang-parser.yy" +#line 1012 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::IpMatch(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2215,7 +2215,7 @@ namespace yy { break; case 63: -#line 1017 "seclang-parser.yy" +#line 1016 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Le(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2223,7 +2223,7 @@ namespace yy { break; case 64: -#line 1021 "seclang-parser.yy" +#line 1020 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Lt(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2231,7 +2231,7 @@ namespace yy { break; case 65: -#line 1025 "seclang-parser.yy" +#line 1024 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::PmFromFile(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2239,7 +2239,7 @@ namespace yy { break; case 66: -#line 1029 "seclang-parser.yy" +#line 1028 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Pm(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2247,7 +2247,7 @@ namespace yy { break; case 67: -#line 1033 "seclang-parser.yy" +#line 1032 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rbl(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2255,7 +2255,7 @@ namespace yy { break; case 68: -#line 1037 "seclang-parser.yy" +#line 1036 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rx(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2263,7 +2263,7 @@ namespace yy { break; case 69: -#line 1041 "seclang-parser.yy" +#line 1040 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::StrEq(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2271,7 +2271,7 @@ namespace yy { break; case 70: -#line 1045 "seclang-parser.yy" +#line 1044 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::StrMatch(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2279,7 +2279,7 @@ namespace yy { break; case 71: -#line 1049 "seclang-parser.yy" +#line 1048 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::BeginsWith(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2287,7 +2287,7 @@ namespace yy { break; case 72: -#line 1053 "seclang-parser.yy" +#line 1052 "seclang-parser.yy" { #if defined(WITH_GEOIP) or defined(WITH_MAXMIND) OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::GeoLookup()); @@ -2302,7 +2302,7 @@ namespace yy { break; case 74: -#line 1068 "seclang-parser.yy" +#line 1067 "seclang-parser.yy" { std::vector *a = new std::vector(); std::vector *t = new std::vector(); @@ -2319,7 +2319,7 @@ namespace yy { } Operator *op = yystack_[1].value.as < std::unique_ptr > ().release(); - std::unique_ptr rule(new Rule( + std::unique_ptr rule(new RuleWithOperator( /* op */ op, /* variables */ v, /* actions */ a, @@ -2336,14 +2336,14 @@ namespace yy { break; case 75: -#line 1098 "seclang-parser.yy" +#line 1097 "seclang-parser.yy" { variables::Variables *v = new variables::Variables(); for (auto &i : *yystack_[1].value.as < std::unique_ptr > > > ().get()) { v->push_back(i.release()); } - std::unique_ptr rule(new Rule( + std::unique_ptr rule(new RuleWithOperator( /* op */ yystack_[0].value.as < std::unique_ptr > ().release(), /* variables */ v, /* actions */ NULL, @@ -2359,7 +2359,7 @@ namespace yy { break; case 76: -#line 1117 "seclang-parser.yy" +#line 1116 "seclang-parser.yy" { std::vector *a = new std::vector(); std::vector *t = new std::vector(); @@ -2370,7 +2370,7 @@ namespace yy { a->push_back(i.release()); } } - std::unique_ptr rule(new Rule( + std::unique_ptr rule(new RuleWithOperator( /* op */ NULL, /* variables */ NULL, /* actions */ a, @@ -2384,7 +2384,7 @@ namespace yy { break; case 77: -#line 1138 "seclang-parser.yy" +#line 1137 "seclang-parser.yy" { std::string err; std::vector *a = new std::vector(); @@ -2416,7 +2416,7 @@ namespace yy { break; case 78: -#line 1166 "seclang-parser.yy" +#line 1165 "seclang-parser.yy" { bool hasDisruptive = false; std::vector *actions = new std::vector(); @@ -2477,7 +2477,7 @@ namespace yy { break; case 79: -#line 1223 "seclang-parser.yy" +#line 1222 "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)), @@ -2488,7 +2488,7 @@ namespace yy { break; case 80: -#line 1230 "seclang-parser.yy" +#line 1229 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::DisabledRuleEngine; } @@ -2496,7 +2496,7 @@ namespace yy { break; case 81: -#line 1234 "seclang-parser.yy" +#line 1233 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::EnabledRuleEngine; } @@ -2504,7 +2504,7 @@ namespace yy { break; case 82: -#line 1238 "seclang-parser.yy" +#line 1237 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::DetectionOnlyRuleEngine; } @@ -2512,7 +2512,7 @@ namespace yy { break; case 83: -#line 1242 "seclang-parser.yy" +#line 1241 "seclang-parser.yy" { driver.m_secRequestBodyAccess = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -2520,7 +2520,7 @@ namespace yy { break; case 84: -#line 1246 "seclang-parser.yy" +#line 1245 "seclang-parser.yy" { driver.m_secRequestBodyAccess = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -2528,7 +2528,7 @@ namespace yy { break; case 85: -#line 1250 "seclang-parser.yy" +#line 1249 "seclang-parser.yy" { driver.m_secResponseBodyAccess = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -2536,7 +2536,7 @@ namespace yy { break; case 86: -#line 1254 "seclang-parser.yy" +#line 1253 "seclang-parser.yy" { driver.m_secResponseBodyAccess = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -2544,7 +2544,7 @@ namespace yy { break; case 87: -#line 1258 "seclang-parser.yy" +#line 1257 "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."); @@ -2557,7 +2557,7 @@ namespace yy { break; case 88: -#line 1267 "seclang-parser.yy" +#line 1266 "seclang-parser.yy" { driver.m_components.push_back(yystack_[0].value.as < std::string > ()); } @@ -2565,7 +2565,7 @@ namespace yy { break; case 89: -#line 1271 "seclang-parser.yy" +#line 1270 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecConnEngine is not yet supported."); YYERROR; @@ -2574,14 +2574,14 @@ namespace yy { break; case 90: -#line 1276 "seclang-parser.yy" +#line 1275 "seclang-parser.yy" { } #line 2581 "seclang-parser.cc" break; case 91: -#line 1279 "seclang-parser.yy" +#line 1278 "seclang-parser.yy" { driver.m_secWebAppId.m_value = yystack_[0].value.as < std::string > (); driver.m_secWebAppId.m_set = true; @@ -2590,7 +2590,7 @@ namespace yy { break; case 92: -#line 1284 "seclang-parser.yy" +#line 1283 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecServerSignature is not supported."); YYERROR; @@ -2599,7 +2599,7 @@ namespace yy { break; case 93: -#line 1289 "seclang-parser.yy" +#line 1288 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecCacheTransformations is not supported."); YYERROR; @@ -2608,7 +2608,7 @@ namespace yy { break; case 94: -#line 1294 "seclang-parser.yy" +#line 1293 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecDisableBackendCompression is not supported."); YYERROR; @@ -2617,14 +2617,14 @@ namespace yy { break; case 95: -#line 1299 "seclang-parser.yy" +#line 1298 "seclang-parser.yy" { } #line 2624 "seclang-parser.cc" break; case 96: -#line 1302 "seclang-parser.yy" +#line 1301 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecContentInjection is not yet supported."); YYERROR; @@ -2633,14 +2633,14 @@ namespace yy { break; case 97: -#line 1307 "seclang-parser.yy" +#line 1306 "seclang-parser.yy" { } #line 2640 "seclang-parser.cc" break; case 98: -#line 1310 "seclang-parser.yy" +#line 1309 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecChrootDir is not supported."); YYERROR; @@ -2649,7 +2649,7 @@ namespace yy { break; case 99: -#line 1315 "seclang-parser.yy" +#line 1314 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecHashEngine is not yet supported."); YYERROR; @@ -2658,14 +2658,14 @@ namespace yy { break; case 100: -#line 1320 "seclang-parser.yy" +#line 1319 "seclang-parser.yy" { } #line 2665 "seclang-parser.cc" break; case 101: -#line 1323 "seclang-parser.yy" +#line 1322 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashKey is not yet supported."); YYERROR; @@ -2674,7 +2674,7 @@ namespace yy { break; case 102: -#line 1328 "seclang-parser.yy" +#line 1327 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashParam is not yet supported."); YYERROR; @@ -2683,7 +2683,7 @@ namespace yy { break; case 103: -#line 1333 "seclang-parser.yy" +#line 1332 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashMethodRx is not yet supported."); YYERROR; @@ -2692,7 +2692,7 @@ namespace yy { break; case 104: -#line 1338 "seclang-parser.yy" +#line 1337 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashMethodPm is not yet supported."); YYERROR; @@ -2701,7 +2701,7 @@ namespace yy { break; case 105: -#line 1343 "seclang-parser.yy" +#line 1342 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecGsbLookupDb is not supported."); YYERROR; @@ -2710,7 +2710,7 @@ namespace yy { break; case 106: -#line 1348 "seclang-parser.yy" +#line 1347 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecGuardianLog is not supported."); YYERROR; @@ -2719,7 +2719,7 @@ namespace yy { break; case 107: -#line 1353 "seclang-parser.yy" +#line 1352 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecInterceptOnError is not yet supported."); YYERROR; @@ -2728,14 +2728,14 @@ namespace yy { break; case 108: -#line 1358 "seclang-parser.yy" +#line 1357 "seclang-parser.yy" { } #line 2735 "seclang-parser.cc" break; case 109: -#line 1361 "seclang-parser.yy" +#line 1360 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecConnReadStateLimit is not yet supported."); YYERROR; @@ -2744,7 +2744,7 @@ namespace yy { break; case 110: -#line 1366 "seclang-parser.yy" +#line 1365 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecConnWriteStateLimit is not yet supported."); YYERROR; @@ -2753,7 +2753,7 @@ namespace yy { break; case 111: -#line 1371 "seclang-parser.yy" +#line 1370 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecSensorId is not yet supported."); YYERROR; @@ -2762,7 +2762,7 @@ namespace yy { break; case 112: -#line 1376 "seclang-parser.yy" +#line 1375 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecRuleInheritance is not yet supported."); YYERROR; @@ -2771,14 +2771,14 @@ namespace yy { break; case 113: -#line 1381 "seclang-parser.yy" +#line 1380 "seclang-parser.yy" { } #line 2778 "seclang-parser.cc" break; case 114: -#line 1384 "seclang-parser.yy" +#line 1383 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecRulePerfTime is not yet supported."); YYERROR; @@ -2787,7 +2787,7 @@ namespace yy { break; case 115: -#line 1389 "seclang-parser.yy" +#line 1388 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecStreamInBodyInspection is not supported."); YYERROR; @@ -2796,7 +2796,7 @@ namespace yy { break; case 116: -#line 1394 "seclang-parser.yy" +#line 1393 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecStreamOutBodyInspection is not supported."); YYERROR; @@ -2805,7 +2805,7 @@ namespace yy { break; case 117: -#line 1399 "seclang-parser.yy" +#line 1398 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.load(yystack_[0].value.as < std::string > (), &error) == false) { @@ -2822,7 +2822,7 @@ namespace yy { break; case 118: -#line 1412 "seclang-parser.yy" +#line 1411 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadRemoveRuleByTag(yystack_[0].value.as < std::string > (), &error) == false) { @@ -2839,7 +2839,7 @@ namespace yy { break; case 119: -#line 1425 "seclang-parser.yy" +#line 1424 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadRemoveRuleByMsg(yystack_[0].value.as < std::string > (), &error) == false) { @@ -2856,7 +2856,7 @@ namespace yy { break; case 120: -#line 1438 "seclang-parser.yy" +#line 1437 "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) { @@ -2873,7 +2873,7 @@ namespace yy { break; case 121: -#line 1451 "seclang-parser.yy" +#line 1450 "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) { @@ -2890,7 +2890,7 @@ namespace yy { break; case 122: -#line 1464 "seclang-parser.yy" +#line 1463 "seclang-parser.yy" { std::string error; double ruleId; @@ -2920,7 +2920,7 @@ namespace yy { break; case 123: -#line 1490 "seclang-parser.yy" +#line 1489 "seclang-parser.yy" { std::string error; double ruleId; @@ -2951,7 +2951,7 @@ namespace yy { break; case 124: -#line 1518 "seclang-parser.yy" +#line 1517 "seclang-parser.yy" { if (driver.m_debugLog != NULL) { driver.m_debugLog->setDebugLogLevel(atoi(yystack_[0].value.as < std::string > ().c_str())); @@ -2967,7 +2967,7 @@ namespace yy { break; case 125: -#line 1530 "seclang-parser.yy" +#line 1529 "seclang-parser.yy" { if (driver.m_debugLog != NULL) { std::string error; @@ -2990,7 +2990,7 @@ namespace yy { break; case 126: -#line 1550 "seclang-parser.yy" +#line 1549 "seclang-parser.yy" { #if defined(WITH_GEOIP) or defined(WITH_MAXMIND) std::string err; @@ -3021,7 +3021,7 @@ namespace yy { break; case 127: -#line 1577 "seclang-parser.yy" +#line 1576 "seclang-parser.yy" { driver.m_argumentsLimit.m_set = true; driver.m_argumentsLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3030,7 +3030,7 @@ namespace yy { break; case 128: -#line 1583 "seclang-parser.yy" +#line 1582 "seclang-parser.yy" { driver.m_requestBodyLimit.m_set = true; driver.m_requestBodyLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3039,7 +3039,7 @@ namespace yy { break; case 129: -#line 1588 "seclang-parser.yy" +#line 1587 "seclang-parser.yy" { driver.m_requestBodyNoFilesLimit.m_set = true; driver.m_requestBodyNoFilesLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3048,7 +3048,7 @@ namespace yy { break; case 130: -#line 1593 "seclang-parser.yy" +#line 1592 "seclang-parser.yy" { std::stringstream ss; ss << "As of ModSecurity version 3.0, SecRequestBodyInMemoryLimit is no longer "; @@ -3061,7 +3061,7 @@ namespace yy { break; case 131: -#line 1602 "seclang-parser.yy" +#line 1601 "seclang-parser.yy" { driver.m_responseBodyLimit.m_set = true; driver.m_responseBodyLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3070,7 +3070,7 @@ namespace yy { break; case 132: -#line 1607 "seclang-parser.yy" +#line 1606 "seclang-parser.yy" { driver.m_requestBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction; } @@ -3078,7 +3078,7 @@ namespace yy { break; case 133: -#line 1611 "seclang-parser.yy" +#line 1610 "seclang-parser.yy" { driver.m_requestBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::RejectBodyLimitAction; } @@ -3086,7 +3086,7 @@ namespace yy { break; case 134: -#line 1615 "seclang-parser.yy" +#line 1614 "seclang-parser.yy" { driver.m_responseBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction; } @@ -3094,7 +3094,7 @@ namespace yy { break; case 135: -#line 1619 "seclang-parser.yy" +#line 1618 "seclang-parser.yy" { driver.m_responseBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::RejectBodyLimitAction; } @@ -3102,7 +3102,7 @@ namespace yy { break; case 136: -#line 1623 "seclang-parser.yy" +#line 1622 "seclang-parser.yy" { driver.m_remoteRulesActionOnFailed = RulesSet::OnFailedRemoteRulesAction::AbortOnFailedRemoteRulesAction; } @@ -3110,7 +3110,7 @@ namespace yy { break; case 137: -#line 1627 "seclang-parser.yy" +#line 1626 "seclang-parser.yy" { driver.m_remoteRulesActionOnFailed = RulesSet::OnFailedRemoteRulesAction::WarnOnFailedRemoteRulesAction; } @@ -3118,7 +3118,7 @@ namespace yy { break; case 140: -#line 1641 "seclang-parser.yy" +#line 1640 "seclang-parser.yy" { std::istringstream buf(yystack_[0].value.as < std::string > ()); std::istream_iterator beg(buf), end; @@ -3134,7 +3134,7 @@ namespace yy { break; case 141: -#line 1653 "seclang-parser.yy" +#line 1652 "seclang-parser.yy" { driver.m_responseBodyTypeToBeInspected.m_set = true; driver.m_responseBodyTypeToBeInspected.m_clear = true; @@ -3144,7 +3144,7 @@ namespace yy { break; case 142: -#line 1659 "seclang-parser.yy" +#line 1658 "seclang-parser.yy" { driver.m_secXMLExternalEntity = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -3152,7 +3152,7 @@ namespace yy { break; case 143: -#line 1663 "seclang-parser.yy" +#line 1662 "seclang-parser.yy" { driver.m_secXMLExternalEntity = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -3160,7 +3160,7 @@ namespace yy { break; case 144: -#line 1667 "seclang-parser.yy" +#line 1666 "seclang-parser.yy" { /* Parser error disabled to avoid breaking default installations with modsecurity.conf-recommended std::stringstream ss; @@ -3175,7 +3175,7 @@ namespace yy { break; case 147: -#line 1688 "seclang-parser.yy" +#line 1687 "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."); @@ -3186,7 +3186,7 @@ namespace yy { break; case 148: -#line 1695 "seclang-parser.yy" +#line 1694 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecCookieV0Separator is not yet supported."); YYERROR; @@ -3195,7 +3195,7 @@ namespace yy { break; case 150: -#line 1705 "seclang-parser.yy" +#line 1704 "seclang-parser.yy" { std::string error; std::vector param; @@ -3253,7 +3253,7 @@ namespace yy { break; case 151: -#line 1759 "seclang-parser.yy" +#line 1758 "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."); @@ -3264,7 +3264,7 @@ namespace yy { break; case 152: -#line 1766 "seclang-parser.yy" +#line 1765 "seclang-parser.yy" { driver.m_httpblKey.m_set = true; driver.m_httpblKey.m_value = yystack_[0].value.as < std::string > (); @@ -3273,7 +3273,7 @@ namespace yy { break; case 153: -#line 1774 "seclang-parser.yy" +#line 1773 "seclang-parser.yy" { std::unique_ptr > > originalList = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); std::unique_ptr>> newList(new std::vector>()); @@ -3311,7 +3311,7 @@ namespace yy { break; case 154: -#line 1811 "seclang-parser.yy" +#line 1810 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); } @@ -3319,7 +3319,7 @@ namespace yy { break; case 155: -#line 1815 "seclang-parser.yy" +#line 1814 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[1].value.as < std::unique_ptr > > > ()); } @@ -3327,7 +3327,7 @@ namespace yy { break; case 156: -#line 1822 "seclang-parser.yy" +#line 1821 "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 > > > ()); @@ -3336,7 +3336,7 @@ namespace yy { break; case 157: -#line 1827 "seclang-parser.yy" +#line 1826 "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)); @@ -3346,7 +3346,7 @@ namespace yy { break; case 158: -#line 1833 "seclang-parser.yy" +#line 1832 "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)); @@ -3356,7 +3356,7 @@ namespace yy { break; case 159: -#line 1839 "seclang-parser.yy" +#line 1838 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); b->push_back(std::move(yystack_[0].value.as < std::unique_ptr > ())); @@ -3366,7 +3366,7 @@ namespace yy { break; case 160: -#line 1845 "seclang-parser.yy" +#line 1844 "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 > ()))); @@ -3377,7 +3377,7 @@ namespace yy { break; case 161: -#line 1852 "seclang-parser.yy" +#line 1851 "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 > ()))); @@ -3388,7 +3388,7 @@ namespace yy { break; case 162: -#line 1862 "seclang-parser.yy" +#line 1861 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3396,7 +3396,7 @@ namespace yy { break; case 163: -#line 1866 "seclang-parser.yy" +#line 1865 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3404,7 +3404,7 @@ namespace yy { break; case 164: -#line 1870 "seclang-parser.yy" +#line 1869 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_NoDictElement()); } @@ -3412,7 +3412,7 @@ namespace yy { break; case 165: -#line 1874 "seclang-parser.yy" +#line 1873 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3420,7 +3420,7 @@ namespace yy { break; case 166: -#line 1878 "seclang-parser.yy" +#line 1877 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3428,7 +3428,7 @@ namespace yy { break; case 167: -#line 1882 "seclang-parser.yy" +#line 1881 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_NoDictElement()); } @@ -3436,7 +3436,7 @@ namespace yy { break; case 168: -#line 1886 "seclang-parser.yy" +#line 1885 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3444,7 +3444,7 @@ namespace yy { break; case 169: -#line 1890 "seclang-parser.yy" +#line 1889 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3452,7 +3452,7 @@ namespace yy { break; case 170: -#line 1894 "seclang-parser.yy" +#line 1893 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_NoDictElement()); } @@ -3460,7 +3460,7 @@ namespace yy { break; case 171: -#line 1898 "seclang-parser.yy" +#line 1897 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3468,7 +3468,7 @@ namespace yy { break; case 172: -#line 1902 "seclang-parser.yy" +#line 1901 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3476,7 +3476,7 @@ namespace yy { break; case 173: -#line 1906 "seclang-parser.yy" +#line 1905 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_NoDictElement()); } @@ -3484,7 +3484,7 @@ namespace yy { break; case 174: -#line 1910 "seclang-parser.yy" +#line 1909 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3492,7 +3492,7 @@ namespace yy { break; case 175: -#line 1914 "seclang-parser.yy" +#line 1913 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3500,7 +3500,7 @@ namespace yy { break; case 176: -#line 1918 "seclang-parser.yy" +#line 1917 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_NoDictElement()); } @@ -3508,7 +3508,7 @@ namespace yy { break; case 177: -#line 1922 "seclang-parser.yy" +#line 1921 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3516,7 +3516,7 @@ namespace yy { break; case 178: -#line 1926 "seclang-parser.yy" +#line 1925 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3524,7 +3524,7 @@ namespace yy { break; case 179: -#line 1930 "seclang-parser.yy" +#line 1929 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_NoDictElement()); } @@ -3532,7 +3532,7 @@ namespace yy { break; case 180: -#line 1934 "seclang-parser.yy" +#line 1933 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3540,7 +3540,7 @@ namespace yy { break; case 181: -#line 1938 "seclang-parser.yy" +#line 1937 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3548,7 +3548,7 @@ namespace yy { break; case 182: -#line 1942 "seclang-parser.yy" +#line 1941 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_NoDictElement()); } @@ -3556,7 +3556,7 @@ namespace yy { break; case 183: -#line 1946 "seclang-parser.yy" +#line 1945 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3564,7 +3564,7 @@ namespace yy { break; case 184: -#line 1950 "seclang-parser.yy" +#line 1949 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3572,7 +3572,7 @@ namespace yy { break; case 185: -#line 1954 "seclang-parser.yy" +#line 1953 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_NoDictElement()); } @@ -3580,7 +3580,7 @@ namespace yy { break; case 186: -#line 1958 "seclang-parser.yy" +#line 1957 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3588,7 +3588,7 @@ namespace yy { break; case 187: -#line 1962 "seclang-parser.yy" +#line 1961 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3596,7 +3596,7 @@ namespace yy { break; case 188: -#line 1966 "seclang-parser.yy" +#line 1965 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_NoDictElement()); } @@ -3604,7 +3604,7 @@ namespace yy { break; case 189: -#line 1970 "seclang-parser.yy" +#line 1969 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3612,7 +3612,7 @@ namespace yy { break; case 190: -#line 1974 "seclang-parser.yy" +#line 1973 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3620,7 +3620,7 @@ namespace yy { break; case 191: -#line 1978 "seclang-parser.yy" +#line 1977 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_NoDictElement()); } @@ -3628,7 +3628,7 @@ namespace yy { break; case 192: -#line 1982 "seclang-parser.yy" +#line 1981 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3636,7 +3636,7 @@ namespace yy { break; case 193: -#line 1986 "seclang-parser.yy" +#line 1985 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3644,7 +3644,7 @@ namespace yy { break; case 194: -#line 1990 "seclang-parser.yy" +#line 1989 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_NoDictElement()); } @@ -3652,7 +3652,7 @@ namespace yy { break; case 195: -#line 1994 "seclang-parser.yy" +#line 1993 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3660,7 +3660,7 @@ namespace yy { break; case 196: -#line 1998 "seclang-parser.yy" +#line 1997 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3668,7 +3668,7 @@ namespace yy { break; case 197: -#line 2002 "seclang-parser.yy" +#line 2001 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_NoDictElement()); } @@ -3676,7 +3676,7 @@ namespace yy { break; case 198: -#line 2006 "seclang-parser.yy" +#line 2005 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3684,7 +3684,7 @@ namespace yy { break; case 199: -#line 2010 "seclang-parser.yy" +#line 2009 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3692,7 +3692,7 @@ namespace yy { break; case 200: -#line 2014 "seclang-parser.yy" +#line 2013 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_NoDictElement()); } @@ -3700,7 +3700,7 @@ namespace yy { break; case 201: -#line 2018 "seclang-parser.yy" +#line 2017 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3708,7 +3708,7 @@ namespace yy { break; case 202: -#line 2022 "seclang-parser.yy" +#line 2021 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3716,7 +3716,7 @@ namespace yy { break; case 203: -#line 2026 "seclang-parser.yy" +#line 2025 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_NoDictElement()); } @@ -3724,7 +3724,7 @@ namespace yy { break; case 204: -#line 2030 "seclang-parser.yy" +#line 2029 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3732,7 +3732,7 @@ namespace yy { break; case 205: -#line 2034 "seclang-parser.yy" +#line 2033 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3740,7 +3740,7 @@ namespace yy { break; case 206: -#line 2038 "seclang-parser.yy" +#line 2037 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_NoDictElement()); } @@ -3748,7 +3748,7 @@ namespace yy { break; case 207: -#line 2042 "seclang-parser.yy" +#line 2041 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3756,7 +3756,7 @@ namespace yy { break; case 208: -#line 2046 "seclang-parser.yy" +#line 2045 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3764,7 +3764,7 @@ namespace yy { break; case 209: -#line 2050 "seclang-parser.yy" +#line 2049 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_NoDictElement()); } @@ -3772,7 +3772,7 @@ namespace yy { break; case 210: -#line 2054 "seclang-parser.yy" +#line 2053 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3780,7 +3780,7 @@ namespace yy { break; case 211: -#line 2058 "seclang-parser.yy" +#line 2057 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3788,7 +3788,7 @@ namespace yy { break; case 212: -#line 2062 "seclang-parser.yy" +#line 2061 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_NoDictElement()); } @@ -3796,7 +3796,7 @@ namespace yy { break; case 213: -#line 2066 "seclang-parser.yy" +#line 2065 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV:" + yystack_[0].value.as < std::string > ())); } @@ -3804,7 +3804,7 @@ namespace yy { break; case 214: -#line 2070 "seclang-parser.yy" +#line 2069 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV:" + yystack_[0].value.as < std::string > ())); } @@ -3812,7 +3812,7 @@ namespace yy { break; case 215: -#line 2074 "seclang-parser.yy" +#line 2073 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV")); } @@ -3820,7 +3820,7 @@ namespace yy { break; case 216: -#line 2078 "seclang-parser.yy" +#line 2077 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML("XML:" + yystack_[0].value.as < std::string > ())); } @@ -3828,7 +3828,7 @@ namespace yy { break; case 217: -#line 2082 "seclang-parser.yy" +#line 2081 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML("XML:" + yystack_[0].value.as < std::string > ())); } @@ -3836,7 +3836,7 @@ namespace yy { break; case 218: -#line 2086 "seclang-parser.yy" +#line 2085 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML_NoDictElement()); } @@ -3844,7 +3844,7 @@ namespace yy { break; case 219: -#line 2090 "seclang-parser.yy" +#line 2089 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3852,7 +3852,7 @@ namespace yy { break; case 220: -#line 2094 "seclang-parser.yy" +#line 2093 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3860,7 +3860,7 @@ namespace yy { break; case 221: -#line 2098 "seclang-parser.yy" +#line 2097 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_NoDictElement()); } @@ -3868,7 +3868,7 @@ namespace yy { break; case 222: -#line 2102 "seclang-parser.yy" +#line 2101 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3876,7 +3876,7 @@ namespace yy { break; case 223: -#line 2106 "seclang-parser.yy" +#line 2105 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3884,7 +3884,7 @@ namespace yy { break; case 224: -#line 2110 "seclang-parser.yy" +#line 2109 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3892,7 +3892,7 @@ namespace yy { break; case 225: -#line 2114 "seclang-parser.yy" +#line 2113 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_NoDictElement()); } @@ -3900,7 +3900,7 @@ namespace yy { break; case 226: -#line 2118 "seclang-parser.yy" +#line 2117 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3908,7 +3908,7 @@ namespace yy { break; case 227: -#line 2122 "seclang-parser.yy" +#line 2121 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3916,7 +3916,7 @@ namespace yy { break; case 228: -#line 2126 "seclang-parser.yy" +#line 2125 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3924,7 +3924,7 @@ namespace yy { break; case 229: -#line 2130 "seclang-parser.yy" +#line 2129 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_NoDictElement()); } @@ -3932,7 +3932,7 @@ namespace yy { break; case 230: -#line 2134 "seclang-parser.yy" +#line 2133 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3940,7 +3940,7 @@ namespace yy { break; case 231: -#line 2138 "seclang-parser.yy" +#line 2137 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3948,7 +3948,7 @@ namespace yy { break; case 232: -#line 2142 "seclang-parser.yy" +#line 2141 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3956,7 +3956,7 @@ namespace yy { break; case 233: -#line 2146 "seclang-parser.yy" +#line 2145 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_NoDictElement()); } @@ -3964,7 +3964,7 @@ namespace yy { break; case 234: -#line 2150 "seclang-parser.yy" +#line 2149 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3972,7 +3972,7 @@ namespace yy { break; case 235: -#line 2154 "seclang-parser.yy" +#line 2153 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3980,7 +3980,7 @@ namespace yy { break; case 236: -#line 2158 "seclang-parser.yy" +#line 2157 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3988,7 +3988,7 @@ namespace yy { break; case 237: -#line 2162 "seclang-parser.yy" +#line 2161 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_NoDictElement()); } @@ -3996,7 +3996,7 @@ namespace yy { break; case 238: -#line 2166 "seclang-parser.yy" +#line 2165 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -4004,7 +4004,7 @@ namespace yy { break; case 239: -#line 2170 "seclang-parser.yy" +#line 2169 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4012,7 +4012,7 @@ namespace yy { break; case 240: -#line 2174 "seclang-parser.yy" +#line 2173 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4020,7 +4020,7 @@ namespace yy { break; case 241: -#line 2178 "seclang-parser.yy" +#line 2177 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_NoDictElement()); } @@ -4028,7 +4028,7 @@ namespace yy { break; case 242: -#line 2182 "seclang-parser.yy" +#line 2181 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -4036,7 +4036,7 @@ namespace yy { break; case 243: -#line 2186 "seclang-parser.yy" +#line 2185 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4044,7 +4044,7 @@ namespace yy { break; case 244: -#line 2190 "seclang-parser.yy" +#line 2189 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4052,7 +4052,7 @@ namespace yy { break; case 245: -#line 2194 "seclang-parser.yy" +#line 2193 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_NoDictElement()); } @@ -4060,7 +4060,7 @@ namespace yy { break; case 246: -#line 2198 "seclang-parser.yy" +#line 2197 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4068,7 +4068,7 @@ namespace yy { break; case 247: -#line 2202 "seclang-parser.yy" +#line 2201 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4076,7 +4076,7 @@ namespace yy { break; case 248: -#line 2206 "seclang-parser.yy" +#line 2205 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_NoDictElement()); } @@ -4084,7 +4084,7 @@ namespace yy { break; case 249: -#line 2210 "seclang-parser.yy" +#line 2209 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4092,7 +4092,7 @@ namespace yy { break; case 250: -#line 2214 "seclang-parser.yy" +#line 2213 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4100,7 +4100,7 @@ namespace yy { break; case 251: -#line 2218 "seclang-parser.yy" +#line 2217 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_NoDictElement()); } @@ -4108,7 +4108,7 @@ namespace yy { break; case 252: -#line 2223 "seclang-parser.yy" +#line 2222 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4116,7 +4116,7 @@ namespace yy { break; case 253: -#line 2227 "seclang-parser.yy" +#line 2226 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4124,7 +4124,7 @@ namespace yy { break; case 254: -#line 2231 "seclang-parser.yy" +#line 2230 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_NoDictElement()); } @@ -4132,7 +4132,7 @@ namespace yy { break; case 255: -#line 2236 "seclang-parser.yy" +#line 2235 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4140,7 +4140,7 @@ namespace yy { break; case 256: -#line 2240 "seclang-parser.yy" +#line 2239 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4148,7 +4148,7 @@ namespace yy { break; case 257: -#line 2244 "seclang-parser.yy" +#line 2243 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_NoDictElement()); } @@ -4156,7 +4156,7 @@ namespace yy { break; case 258: -#line 2249 "seclang-parser.yy" +#line 2248 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseContentType()); } @@ -4164,7 +4164,7 @@ namespace yy { break; case 259: -#line 2254 "seclang-parser.yy" +#line 2253 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4172,7 +4172,7 @@ namespace yy { break; case 260: -#line 2258 "seclang-parser.yy" +#line 2257 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4180,7 +4180,7 @@ namespace yy { break; case 261: -#line 2262 "seclang-parser.yy" +#line 2261 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_NoDictElement()); } @@ -4188,7 +4188,7 @@ namespace yy { break; case 262: -#line 2266 "seclang-parser.yy" +#line 2265 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsCombinedSize()); } @@ -4196,7 +4196,7 @@ namespace yy { break; case 263: -#line 2270 "seclang-parser.yy" +#line 2269 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::AuthType()); } @@ -4204,7 +4204,7 @@ namespace yy { break; case 264: -#line 2274 "seclang-parser.yy" +#line 2273 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesCombinedSize()); } @@ -4212,7 +4212,7 @@ namespace yy { break; case 265: -#line 2278 "seclang-parser.yy" +#line 2277 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FullRequest()); } @@ -4220,7 +4220,7 @@ namespace yy { break; case 266: -#line 2282 "seclang-parser.yy" +#line 2281 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FullRequestLength()); } @@ -4228,7 +4228,7 @@ namespace yy { break; case 267: -#line 2286 "seclang-parser.yy" +#line 2285 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::InboundDataError()); } @@ -4236,7 +4236,7 @@ namespace yy { break; case 268: -#line 2290 "seclang-parser.yy" +#line 2289 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVar()); } @@ -4244,7 +4244,7 @@ namespace yy { break; case 269: -#line 2294 "seclang-parser.yy" +#line 2293 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarName()); } @@ -4252,7 +4252,7 @@ namespace yy { break; case 270: -#line 2298 "seclang-parser.yy" +#line 2297 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartBoundaryQuoted()); } @@ -4260,7 +4260,7 @@ namespace yy { break; case 271: -#line 2302 "seclang-parser.yy" +#line 2301 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartBoundaryWhiteSpace()); } @@ -4268,7 +4268,7 @@ namespace yy { break; case 272: -#line 2306 "seclang-parser.yy" +#line 2305 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartCrlfLFLines()); } @@ -4276,7 +4276,7 @@ namespace yy { break; case 273: -#line 2310 "seclang-parser.yy" +#line 2309 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartDateAfter()); } @@ -4284,7 +4284,7 @@ namespace yy { break; case 274: -#line 2314 "seclang-parser.yy" +#line 2313 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartDateBefore()); } @@ -4292,7 +4292,7 @@ namespace yy { break; case 275: -#line 2318 "seclang-parser.yy" +#line 2317 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartFileLimitExceeded()); } @@ -4300,7 +4300,7 @@ namespace yy { break; case 276: -#line 2322 "seclang-parser.yy" +#line 2321 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartHeaderFolding()); } @@ -4308,7 +4308,7 @@ namespace yy { break; case 277: -#line 2326 "seclang-parser.yy" +#line 2325 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidHeaderFolding()); } @@ -4316,7 +4316,7 @@ namespace yy { break; case 278: -#line 2330 "seclang-parser.yy" +#line 2329 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidPart()); } @@ -4324,7 +4324,7 @@ namespace yy { break; case 279: -#line 2334 "seclang-parser.yy" +#line 2333 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidQuoting()); } @@ -4332,7 +4332,7 @@ namespace yy { break; case 280: -#line 2338 "seclang-parser.yy" +#line 2337 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartLFLine()); } @@ -4340,7 +4340,7 @@ namespace yy { break; case 281: -#line 2342 "seclang-parser.yy" +#line 2341 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartMissingSemicolon()); } @@ -4348,7 +4348,7 @@ namespace yy { break; case 282: -#line 2346 "seclang-parser.yy" +#line 2345 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartMissingSemicolon()); } @@ -4356,7 +4356,7 @@ namespace yy { break; case 283: -#line 2350 "seclang-parser.yy" +#line 2349 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartStrictError()); } @@ -4364,7 +4364,7 @@ namespace yy { break; case 284: -#line 2354 "seclang-parser.yy" +#line 2353 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartUnmatchedBoundary()); } @@ -4372,7 +4372,7 @@ namespace yy { break; case 285: -#line 2358 "seclang-parser.yy" +#line 2357 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::OutboundDataError()); } @@ -4380,7 +4380,7 @@ namespace yy { break; case 286: -#line 2362 "seclang-parser.yy" +#line 2361 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::PathInfo()); } @@ -4388,7 +4388,7 @@ namespace yy { break; case 287: -#line 2366 "seclang-parser.yy" +#line 2365 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::QueryString()); } @@ -4396,7 +4396,7 @@ namespace yy { break; case 288: -#line 2370 "seclang-parser.yy" +#line 2369 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemoteAddr()); } @@ -4404,7 +4404,7 @@ namespace yy { break; case 289: -#line 2374 "seclang-parser.yy" +#line 2373 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemoteHost()); } @@ -4412,7 +4412,7 @@ namespace yy { break; case 290: -#line 2378 "seclang-parser.yy" +#line 2377 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemotePort()); } @@ -4420,7 +4420,7 @@ namespace yy { break; case 291: -#line 2382 "seclang-parser.yy" +#line 2381 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyError()); } @@ -4428,7 +4428,7 @@ namespace yy { break; case 292: -#line 2386 "seclang-parser.yy" +#line 2385 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyErrorMsg()); } @@ -4436,7 +4436,7 @@ namespace yy { break; case 293: -#line 2390 "seclang-parser.yy" +#line 2389 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessor()); } @@ -4444,7 +4444,7 @@ namespace yy { break; case 294: -#line 2394 "seclang-parser.yy" +#line 2393 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessorError()); } @@ -4452,7 +4452,7 @@ namespace yy { break; case 295: -#line 2398 "seclang-parser.yy" +#line 2397 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessorErrorMsg()); } @@ -4460,7 +4460,7 @@ namespace yy { break; case 296: -#line 2402 "seclang-parser.yy" +#line 2401 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBasename()); } @@ -4468,7 +4468,7 @@ namespace yy { break; case 297: -#line 2406 "seclang-parser.yy" +#line 2405 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBody()); } @@ -4476,7 +4476,7 @@ namespace yy { break; case 298: -#line 2410 "seclang-parser.yy" +#line 2409 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBodyLength()); } @@ -4484,7 +4484,7 @@ namespace yy { break; case 299: -#line 2414 "seclang-parser.yy" +#line 2413 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestFilename()); } @@ -4492,7 +4492,7 @@ namespace yy { break; case 300: -#line 2418 "seclang-parser.yy" +#line 2417 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestLine()); } @@ -4500,7 +4500,7 @@ namespace yy { break; case 301: -#line 2422 "seclang-parser.yy" +#line 2421 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestMethod()); } @@ -4508,7 +4508,7 @@ namespace yy { break; case 302: -#line 2426 "seclang-parser.yy" +#line 2425 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestProtocol()); } @@ -4516,7 +4516,7 @@ namespace yy { break; case 303: -#line 2430 "seclang-parser.yy" +#line 2429 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestURI()); } @@ -4524,7 +4524,7 @@ namespace yy { break; case 304: -#line 2434 "seclang-parser.yy" +#line 2433 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestURIRaw()); } @@ -4532,7 +4532,7 @@ namespace yy { break; case 305: -#line 2438 "seclang-parser.yy" +#line 2437 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseBody()); } @@ -4540,7 +4540,7 @@ namespace yy { break; case 306: -#line 2442 "seclang-parser.yy" +#line 2441 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseContentLength()); } @@ -4548,7 +4548,7 @@ namespace yy { break; case 307: -#line 2446 "seclang-parser.yy" +#line 2445 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseProtocol()); } @@ -4556,7 +4556,7 @@ namespace yy { break; case 308: -#line 2450 "seclang-parser.yy" +#line 2449 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseStatus()); } @@ -4564,7 +4564,7 @@ namespace yy { break; case 309: -#line 2454 "seclang-parser.yy" +#line 2453 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerAddr()); } @@ -4572,7 +4572,7 @@ namespace yy { break; case 310: -#line 2458 "seclang-parser.yy" +#line 2457 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerName()); } @@ -4580,7 +4580,7 @@ namespace yy { break; case 311: -#line 2462 "seclang-parser.yy" +#line 2461 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerPort()); } @@ -4588,7 +4588,7 @@ namespace yy { break; case 312: -#line 2466 "seclang-parser.yy" +#line 2465 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::SessionID()); } @@ -4596,7 +4596,7 @@ namespace yy { break; case 313: -#line 2470 "seclang-parser.yy" +#line 2469 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UniqueID()); } @@ -4604,7 +4604,7 @@ namespace yy { break; case 314: -#line 2474 "seclang-parser.yy" +#line 2473 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UrlEncodedError()); } @@ -4612,7 +4612,7 @@ namespace yy { break; case 315: -#line 2478 "seclang-parser.yy" +#line 2477 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UserID()); } @@ -4620,7 +4620,7 @@ namespace yy { break; case 316: -#line 2482 "seclang-parser.yy" +#line 2481 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Status()); } @@ -4628,7 +4628,7 @@ namespace yy { break; case 317: -#line 2486 "seclang-parser.yy" +#line 2485 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Status()); } @@ -4636,7 +4636,7 @@ namespace yy { break; case 318: -#line 2490 "seclang-parser.yy" +#line 2489 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::WebAppId()); } @@ -4644,7 +4644,7 @@ namespace yy { break; case 319: -#line 2494 "seclang-parser.yy" +#line 2493 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4655,7 +4655,7 @@ namespace yy { break; case 320: -#line 2502 "seclang-parser.yy" +#line 2501 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4666,7 +4666,7 @@ namespace yy { break; case 321: -#line 2509 "seclang-parser.yy" +#line 2508 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4677,7 +4677,7 @@ namespace yy { break; case 322: -#line 2516 "seclang-parser.yy" +#line 2515 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4688,7 +4688,7 @@ namespace yy { break; case 323: -#line 2523 "seclang-parser.yy" +#line 2522 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4699,7 +4699,7 @@ namespace yy { break; case 324: -#line 2530 "seclang-parser.yy" +#line 2529 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4710,7 +4710,7 @@ namespace yy { break; case 325: -#line 2537 "seclang-parser.yy" +#line 2536 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4721,7 +4721,7 @@ namespace yy { break; case 326: -#line 2544 "seclang-parser.yy" +#line 2543 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4732,7 +4732,7 @@ namespace yy { break; case 327: -#line 2551 "seclang-parser.yy" +#line 2550 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4743,7 +4743,7 @@ namespace yy { break; case 328: -#line 2558 "seclang-parser.yy" +#line 2557 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4754,7 +4754,7 @@ namespace yy { break; case 329: -#line 2565 "seclang-parser.yy" +#line 2564 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4765,7 +4765,7 @@ namespace yy { break; case 330: -#line 2572 "seclang-parser.yy" +#line 2571 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4776,7 +4776,7 @@ namespace yy { break; case 331: -#line 2579 "seclang-parser.yy" +#line 2578 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4787,7 +4787,7 @@ namespace yy { break; case 332: -#line 2589 "seclang-parser.yy" +#line 2588 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Accuracy(yystack_[0].value.as < std::string > ())); } @@ -4795,7 +4795,7 @@ namespace yy { break; case 333: -#line 2593 "seclang-parser.yy" +#line 2592 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Allow(yystack_[0].value.as < std::string > ())); } @@ -4803,7 +4803,7 @@ namespace yy { break; case 334: -#line 2597 "seclang-parser.yy" +#line 2596 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Append", yystack_[1].location); } @@ -4811,7 +4811,7 @@ namespace yy { break; case 335: -#line 2601 "seclang-parser.yy" +#line 2600 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::AuditLog(yystack_[0].value.as < std::string > ())); } @@ -4819,7 +4819,7 @@ namespace yy { break; case 336: -#line 2605 "seclang-parser.yy" +#line 2604 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Block(yystack_[0].value.as < std::string > ())); } @@ -4827,7 +4827,7 @@ namespace yy { break; case 337: -#line 2609 "seclang-parser.yy" +#line 2608 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Capture(yystack_[0].value.as < std::string > ())); } @@ -4835,7 +4835,7 @@ namespace yy { break; case 338: -#line 2613 "seclang-parser.yy" +#line 2612 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Chain(yystack_[0].value.as < std::string > ())); } @@ -4843,7 +4843,7 @@ namespace yy { break; case 339: -#line 2617 "seclang-parser.yy" +#line 2616 "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 > ())); @@ -4852,7 +4852,7 @@ namespace yy { break; case 340: -#line 2622 "seclang-parser.yy" +#line 2621 "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 > ())); @@ -4861,7 +4861,7 @@ namespace yy { break; case 341: -#line 2627 "seclang-parser.yy" +#line 2626 "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 > ())); @@ -4870,7 +4870,7 @@ namespace yy { break; case 342: -#line 2632 "seclang-parser.yy" +#line 2631 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::AuditLogParts(yystack_[0].value.as < std::string > ())); } @@ -4878,7 +4878,7 @@ namespace yy { break; case 343: -#line 2636 "seclang-parser.yy" +#line 2635 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorJSON(yystack_[0].value.as < std::string > ())); } @@ -4886,7 +4886,7 @@ namespace yy { break; case 344: -#line 2640 "seclang-parser.yy" +#line 2639 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorXML(yystack_[0].value.as < std::string > ())); } @@ -4894,7 +4894,7 @@ namespace yy { break; case 345: -#line 2644 "seclang-parser.yy" +#line 2643 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorURLENCODED(yystack_[0].value.as < std::string > ())); } @@ -4902,7 +4902,7 @@ namespace yy { break; case 346: -#line 2648 "seclang-parser.yy" +#line 2647 "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 > ())); @@ -4911,7 +4911,7 @@ namespace yy { break; case 347: -#line 2653 "seclang-parser.yy" +#line 2652 "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 > ())); @@ -4920,7 +4920,7 @@ namespace yy { break; case 348: -#line 2658 "seclang-parser.yy" +#line 2657 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyAccess(yystack_[1].value.as < std::string > () + "true")); } @@ -4928,7 +4928,7 @@ namespace yy { break; case 349: -#line 2662 "seclang-parser.yy" +#line 2661 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyAccess(yystack_[1].value.as < std::string > () + "false")); } @@ -4936,7 +4936,7 @@ namespace yy { break; case 350: -#line 2666 "seclang-parser.yy" +#line 2665 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=on")); } @@ -4944,7 +4944,7 @@ namespace yy { break; case 351: -#line 2670 "seclang-parser.yy" +#line 2669 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=off")); } @@ -4952,7 +4952,7 @@ namespace yy { break; case 352: -#line 2674 "seclang-parser.yy" +#line 2673 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=detectiononly")); } @@ -4960,7 +4960,7 @@ namespace yy { break; case 353: -#line 2678 "seclang-parser.yy" +#line 2677 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveById(yystack_[0].value.as < std::string > ())); } @@ -4968,7 +4968,7 @@ namespace yy { break; case 354: -#line 2682 "seclang-parser.yy" +#line 2681 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveByTag(yystack_[0].value.as < std::string > ())); } @@ -4976,7 +4976,7 @@ namespace yy { break; case 355: -#line 2686 "seclang-parser.yy" +#line 2685 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveTargetById(yystack_[0].value.as < std::string > ())); } @@ -4984,7 +4984,7 @@ namespace yy { break; case 356: -#line 2690 "seclang-parser.yy" +#line 2689 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveTargetByTag(yystack_[0].value.as < std::string > ())); } @@ -4992,7 +4992,7 @@ namespace yy { break; case 357: -#line 2694 "seclang-parser.yy" +#line 2693 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Deny(yystack_[0].value.as < std::string > ())); } @@ -5000,7 +5000,7 @@ namespace yy { break; case 358: -#line 2698 "seclang-parser.yy" +#line 2697 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("DeprecateVar", yystack_[1].location); } @@ -5008,7 +5008,7 @@ namespace yy { break; case 359: -#line 2702 "seclang-parser.yy" +#line 2701 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Drop(yystack_[0].value.as < std::string > ())); } @@ -5016,7 +5016,7 @@ namespace yy { break; case 360: -#line 2706 "seclang-parser.yy" +#line 2705 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Exec(yystack_[0].value.as < std::string > ())); } @@ -5024,7 +5024,7 @@ namespace yy { break; case 361: -#line 2710 "seclang-parser.yy" +#line 2709 "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 > ())); @@ -5033,7 +5033,7 @@ namespace yy { break; case 362: -#line 2715 "seclang-parser.yy" +#line 2714 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::RuleId(yystack_[0].value.as < std::string > ())); } @@ -5041,7 +5041,7 @@ namespace yy { break; case 363: -#line 2719 "seclang-parser.yy" +#line 2718 "seclang-parser.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 > ()))); } @@ -5049,7 +5049,7 @@ namespace yy { break; case 364: -#line 2723 "seclang-parser.yy" +#line 2722 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::LogData(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5057,7 +5057,7 @@ namespace yy { break; case 365: -#line 2727 "seclang-parser.yy" +#line 2726 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Log(yystack_[0].value.as < std::string > ())); } @@ -5065,7 +5065,7 @@ namespace yy { break; case 366: -#line 2731 "seclang-parser.yy" +#line 2730 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Maturity(yystack_[0].value.as < std::string > ())); } @@ -5073,7 +5073,7 @@ namespace yy { break; case 367: -#line 2735 "seclang-parser.yy" +#line 2734 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Msg(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5081,7 +5081,7 @@ namespace yy { break; case 368: -#line 2739 "seclang-parser.yy" +#line 2738 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::MultiMatch(yystack_[0].value.as < std::string > ())); } @@ -5089,7 +5089,7 @@ namespace yy { break; case 369: -#line 2743 "seclang-parser.yy" +#line 2742 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::NoAuditLog(yystack_[0].value.as < std::string > ())); } @@ -5097,7 +5097,7 @@ namespace yy { break; case 370: -#line 2747 "seclang-parser.yy" +#line 2746 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::NoLog(yystack_[0].value.as < std::string > ())); } @@ -5105,7 +5105,7 @@ namespace yy { break; case 371: -#line 2751 "seclang-parser.yy" +#line 2750 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Pass(yystack_[0].value.as < std::string > ())); } @@ -5113,7 +5113,7 @@ namespace yy { break; case 372: -#line 2755 "seclang-parser.yy" +#line 2754 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Pause", yystack_[1].location); } @@ -5121,7 +5121,7 @@ namespace yy { break; case 373: -#line 2759 "seclang-parser.yy" +#line 2758 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Phase(yystack_[0].value.as < std::string > ())); } @@ -5129,7 +5129,7 @@ namespace yy { break; case 374: -#line 2763 "seclang-parser.yy" +#line 2762 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Prepend", yystack_[1].location); } @@ -5137,7 +5137,7 @@ namespace yy { break; case 375: -#line 2767 "seclang-parser.yy" +#line 2766 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Proxy", yystack_[1].location); } @@ -5145,7 +5145,7 @@ namespace yy { break; case 376: -#line 2771 "seclang-parser.yy" +#line 2770 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Redirect(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5153,7 +5153,7 @@ namespace yy { break; case 377: -#line 2775 "seclang-parser.yy" +#line 2774 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Rev(yystack_[0].value.as < std::string > ())); } @@ -5161,7 +5161,7 @@ namespace yy { break; case 378: -#line 2779 "seclang-parser.yy" +#line 2778 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseArg", yystack_[1].location); } @@ -5169,7 +5169,7 @@ namespace yy { break; case 379: -#line 2783 "seclang-parser.yy" +#line 2782 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseMatched", yystack_[1].location); } @@ -5177,7 +5177,7 @@ namespace yy { break; case 380: -#line 2787 "seclang-parser.yy" +#line 2786 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseMatchedBytes", yystack_[1].location); } @@ -5185,7 +5185,7 @@ namespace yy { break; case 381: -#line 2791 "seclang-parser.yy" +#line 2790 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseRequestHeader", yystack_[1].location); } @@ -5193,7 +5193,7 @@ namespace yy { break; case 382: -#line 2795 "seclang-parser.yy" +#line 2794 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseResponseHeader", yystack_[1].location); } @@ -5201,7 +5201,7 @@ namespace yy { break; case 383: -#line 2799 "seclang-parser.yy" +#line 2798 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetENV(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5209,7 +5209,7 @@ namespace yy { break; case 384: -#line 2803 "seclang-parser.yy" +#line 2802 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetRSC(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5217,7 +5217,7 @@ namespace yy { break; case 385: -#line 2807 "seclang-parser.yy" +#line 2806 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetSID(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5225,7 +5225,7 @@ namespace yy { break; case 386: -#line 2811 "seclang-parser.yy" +#line 2810 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetUID(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5233,7 +5233,7 @@ namespace yy { break; case 387: -#line 2815 "seclang-parser.yy" +#line 2814 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > () = std::move(yystack_[0].value.as < std::unique_ptr > ()); } @@ -5241,7 +5241,7 @@ namespace yy { break; case 388: -#line 2819 "seclang-parser.yy" +#line 2818 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Severity(yystack_[0].value.as < std::string > ())); } @@ -5249,7 +5249,7 @@ namespace yy { break; case 389: -#line 2823 "seclang-parser.yy" +#line 2822 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Skip(yystack_[0].value.as < std::string > ())); } @@ -5257,7 +5257,7 @@ namespace yy { break; case 390: -#line 2827 "seclang-parser.yy" +#line 2826 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SkipAfter(yystack_[0].value.as < std::string > ())); } @@ -5265,7 +5265,7 @@ namespace yy { break; case 391: -#line 2831 "seclang-parser.yy" +#line 2830 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::data::Status(yystack_[0].value.as < std::string > ())); } @@ -5273,7 +5273,7 @@ namespace yy { break; case 392: -#line 2835 "seclang-parser.yy" +#line 2834 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Tag(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5281,7 +5281,7 @@ namespace yy { break; case 393: -#line 2839 "seclang-parser.yy" +#line 2838 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Ver(yystack_[0].value.as < std::string > ())); } @@ -5289,7 +5289,7 @@ namespace yy { break; case 394: -#line 2843 "seclang-parser.yy" +#line 2842 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::XmlNS(yystack_[0].value.as < std::string > ())); } @@ -5297,7 +5297,7 @@ namespace yy { break; case 395: -#line 2847 "seclang-parser.yy" +#line 2846 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityZero7bit(yystack_[0].value.as < std::string > ())); } @@ -5305,7 +5305,7 @@ namespace yy { break; case 396: -#line 2851 "seclang-parser.yy" +#line 2850 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityOdd7bit(yystack_[0].value.as < std::string > ())); } @@ -5313,7 +5313,7 @@ namespace yy { break; case 397: -#line 2855 "seclang-parser.yy" +#line 2854 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityEven7bit(yystack_[0].value.as < std::string > ())); } @@ -5321,7 +5321,7 @@ namespace yy { break; case 398: -#line 2859 "seclang-parser.yy" +#line 2858 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::SqlHexDecode(yystack_[0].value.as < std::string > ())); } @@ -5329,7 +5329,7 @@ namespace yy { break; case 399: -#line 2863 "seclang-parser.yy" +#line 2862 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64Encode(yystack_[0].value.as < std::string > ())); } @@ -5337,7 +5337,7 @@ namespace yy { break; case 400: -#line 2867 "seclang-parser.yy" +#line 2866 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64Decode(yystack_[0].value.as < std::string > ())); } @@ -5345,7 +5345,7 @@ namespace yy { break; case 401: -#line 2871 "seclang-parser.yy" +#line 2870 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64DecodeExt(yystack_[0].value.as < std::string > ())); } @@ -5353,7 +5353,7 @@ namespace yy { break; case 402: -#line 2875 "seclang-parser.yy" +#line 2874 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CmdLine(yystack_[0].value.as < std::string > ())); } @@ -5361,7 +5361,7 @@ namespace yy { break; case 403: -#line 2879 "seclang-parser.yy" +#line 2878 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Sha1(yystack_[0].value.as < std::string > ())); } @@ -5369,7 +5369,7 @@ namespace yy { break; case 404: -#line 2883 "seclang-parser.yy" +#line 2882 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Md5(yystack_[0].value.as < std::string > ())); } @@ -5377,7 +5377,7 @@ namespace yy { break; case 405: -#line 2887 "seclang-parser.yy" +#line 2886 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::EscapeSeqDecode(yystack_[0].value.as < std::string > ())); } @@ -5385,7 +5385,7 @@ namespace yy { break; case 406: -#line 2891 "seclang-parser.yy" +#line 2890 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HexEncode(yystack_[0].value.as < std::string > ())); } @@ -5393,7 +5393,7 @@ namespace yy { break; case 407: -#line 2895 "seclang-parser.yy" +#line 2894 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HexDecode(yystack_[0].value.as < std::string > ())); } @@ -5401,7 +5401,7 @@ namespace yy { break; case 408: -#line 2899 "seclang-parser.yy" +#line 2898 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::LowerCase(yystack_[0].value.as < std::string > ())); } @@ -5409,7 +5409,7 @@ namespace yy { break; case 409: -#line 2903 "seclang-parser.yy" +#line 2902 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UpperCase(yystack_[0].value.as < std::string > ())); } @@ -5417,7 +5417,7 @@ namespace yy { break; case 410: -#line 2907 "seclang-parser.yy" +#line 2906 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlDecodeUni(yystack_[0].value.as < std::string > ())); } @@ -5425,7 +5425,7 @@ namespace yy { break; case 411: -#line 2911 "seclang-parser.yy" +#line 2910 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlDecode(yystack_[0].value.as < std::string > ())); } @@ -5433,7 +5433,7 @@ namespace yy { break; case 412: -#line 2915 "seclang-parser.yy" +#line 2914 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlEncode(yystack_[0].value.as < std::string > ())); } @@ -5441,7 +5441,7 @@ namespace yy { break; case 413: -#line 2919 "seclang-parser.yy" +#line 2918 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::None(yystack_[0].value.as < std::string > ())); } @@ -5449,7 +5449,7 @@ namespace yy { break; case 414: -#line 2923 "seclang-parser.yy" +#line 2922 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CompressWhitespace(yystack_[0].value.as < std::string > ())); } @@ -5457,7 +5457,7 @@ namespace yy { break; case 415: -#line 2927 "seclang-parser.yy" +#line 2926 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveWhitespace(yystack_[0].value.as < std::string > ())); } @@ -5465,7 +5465,7 @@ namespace yy { break; case 416: -#line 2931 "seclang-parser.yy" +#line 2930 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ReplaceNulls(yystack_[0].value.as < std::string > ())); } @@ -5473,7 +5473,7 @@ namespace yy { break; case 417: -#line 2935 "seclang-parser.yy" +#line 2934 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveNulls(yystack_[0].value.as < std::string > ())); } @@ -5481,7 +5481,7 @@ namespace yy { break; case 418: -#line 2939 "seclang-parser.yy" +#line 2938 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HtmlEntityDecode(yystack_[0].value.as < std::string > ())); } @@ -5489,7 +5489,7 @@ namespace yy { break; case 419: -#line 2943 "seclang-parser.yy" +#line 2942 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::JsDecode(yystack_[0].value.as < std::string > ())); } @@ -5497,7 +5497,7 @@ namespace yy { break; case 420: -#line 2947 "seclang-parser.yy" +#line 2946 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CssDecode(yystack_[0].value.as < std::string > ())); } @@ -5505,7 +5505,7 @@ namespace yy { break; case 421: -#line 2951 "seclang-parser.yy" +#line 2950 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Trim(yystack_[0].value.as < std::string > ())); } @@ -5513,7 +5513,7 @@ namespace yy { break; case 422: -#line 2955 "seclang-parser.yy" +#line 2954 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::TrimLeft(yystack_[0].value.as < std::string > ())); } @@ -5521,7 +5521,7 @@ namespace yy { break; case 423: -#line 2959 "seclang-parser.yy" +#line 2958 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::TrimRight(yystack_[0].value.as < std::string > ())); } @@ -5529,7 +5529,7 @@ namespace yy { break; case 424: -#line 2963 "seclang-parser.yy" +#line 2962 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::NormalisePathWin(yystack_[0].value.as < std::string > ())); } @@ -5537,7 +5537,7 @@ namespace yy { break; case 425: -#line 2967 "seclang-parser.yy" +#line 2966 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::NormalisePath(yystack_[0].value.as < std::string > ())); } @@ -5545,7 +5545,7 @@ namespace yy { break; case 426: -#line 2971 "seclang-parser.yy" +#line 2970 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Length(yystack_[0].value.as < std::string > ())); } @@ -5553,7 +5553,7 @@ namespace yy { break; case 427: -#line 2975 "seclang-parser.yy" +#line 2974 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Utf8ToUnicode(yystack_[0].value.as < std::string > ())); } @@ -5561,7 +5561,7 @@ namespace yy { break; case 428: -#line 2979 "seclang-parser.yy" +#line 2978 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveCommentsChar(yystack_[0].value.as < std::string > ())); } @@ -5569,7 +5569,7 @@ namespace yy { break; case 429: -#line 2983 "seclang-parser.yy" +#line 2982 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveComments(yystack_[0].value.as < std::string > ())); } @@ -5577,7 +5577,7 @@ namespace yy { break; case 430: -#line 2987 "seclang-parser.yy" +#line 2986 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ReplaceComments(yystack_[0].value.as < std::string > ())); } @@ -5585,7 +5585,7 @@ namespace yy { break; case 431: -#line 2994 "seclang-parser.yy" +#line 2993 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::unsetOperation, std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5593,7 +5593,7 @@ namespace yy { break; case 432: -#line 2998 "seclang-parser.yy" +#line 2997 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetVar(actions::SetVarOperation::setToOneOperation, std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5601,7 +5601,7 @@ namespace yy { break; case 433: -#line 3002 "seclang-parser.yy" +#line 3001 "seclang-parser.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 > ()))); } @@ -5609,7 +5609,7 @@ namespace yy { break; case 434: -#line 3006 "seclang-parser.yy" +#line 3005 "seclang-parser.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 > ()))); } @@ -5617,7 +5617,7 @@ namespace yy { break; case 435: -#line 3010 "seclang-parser.yy" +#line 3009 "seclang-parser.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 > ()))); } @@ -5625,7 +5625,7 @@ namespace yy { break; case 436: -#line 3017 "seclang-parser.yy" +#line 3016 "seclang-parser.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 > ()); @@ -5634,7 +5634,7 @@ namespace yy { break; case 437: -#line 3022 "seclang-parser.yy" +#line 3021 "seclang-parser.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 > ()); @@ -5643,7 +5643,7 @@ namespace yy { break; case 438: -#line 3027 "seclang-parser.yy" +#line 3026 "seclang-parser.yy" { std::unique_ptr r(new RunTimeString()); r->appendText(yystack_[0].value.as < std::string > ()); @@ -5653,7 +5653,7 @@ namespace yy { break; case 439: -#line 3033 "seclang-parser.yy" +#line 3032 "seclang-parser.yy" { std::unique_ptr r(new RunTimeString()); r->appendVar(std::move(yystack_[0].value.as < std::unique_ptr > ())); @@ -7073,50 +7073,50 @@ namespace yy { const short seclang_parser::yyrline_[] = { - 0, 708, 708, 712, 713, 716, 721, 727, 733, 737, - 741, 747, 753, 759, 765, 770, 775, 781, 788, 792, - 796, 802, 806, 810, 815, 820, 825, 830, 834, 841, - 845, 852, 858, 868, 877, 887, 896, 909, 913, 917, - 921, 925, 929, 933, 937, 941, 945, 950, 954, 958, - 962, 966, 970, 975, 980, 984, 988, 992, 996, 1000, - 1004, 1008, 1012, 1016, 1020, 1024, 1028, 1032, 1036, 1040, - 1044, 1048, 1052, 1066, 1067, 1097, 1116, 1137, 1165, 1222, - 1229, 1233, 1237, 1241, 1245, 1249, 1253, 1257, 1266, 1270, - 1275, 1278, 1283, 1288, 1293, 1298, 1301, 1306, 1309, 1314, - 1319, 1322, 1327, 1332, 1337, 1342, 1347, 1352, 1357, 1360, - 1365, 1370, 1375, 1380, 1383, 1388, 1393, 1398, 1411, 1424, - 1437, 1450, 1463, 1489, 1517, 1529, 1549, 1576, 1582, 1587, - 1592, 1601, 1606, 1610, 1614, 1618, 1622, 1626, 1630, 1635, - 1640, 1652, 1658, 1662, 1666, 1677, 1686, 1687, 1694, 1699, - 1704, 1758, 1765, 1773, 1810, 1814, 1821, 1826, 1832, 1838, - 1844, 1851, 1861, 1865, 1869, 1873, 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, 2222, 2226, 2230, 2235, 2239, 2243, 2248, 2253, - 2257, 2261, 2265, 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, - 2501, 2508, 2515, 2522, 2529, 2536, 2543, 2550, 2557, 2564, - 2571, 2578, 2588, 2592, 2596, 2600, 2604, 2608, 2612, 2616, - 2621, 2626, 2631, 2635, 2639, 2643, 2647, 2652, 2657, 2661, - 2665, 2669, 2673, 2677, 2681, 2685, 2689, 2693, 2697, 2701, - 2705, 2709, 2714, 2718, 2722, 2726, 2730, 2734, 2738, 2742, - 2746, 2750, 2754, 2758, 2762, 2766, 2770, 2774, 2778, 2782, - 2786, 2790, 2794, 2798, 2802, 2806, 2810, 2814, 2818, 2822, - 2826, 2830, 2834, 2838, 2842, 2846, 2850, 2854, 2858, 2862, - 2866, 2870, 2874, 2878, 2882, 2886, 2890, 2894, 2898, 2902, - 2906, 2910, 2914, 2918, 2922, 2926, 2930, 2934, 2938, 2942, - 2946, 2950, 2954, 2958, 2962, 2966, 2970, 2974, 2978, 2982, - 2986, 2993, 2997, 3001, 3005, 3009, 3016, 3021, 3026, 3032 + 0, 707, 707, 711, 712, 715, 720, 726, 732, 736, + 740, 746, 752, 758, 764, 769, 774, 780, 787, 791, + 795, 801, 805, 809, 814, 819, 824, 829, 833, 840, + 844, 851, 857, 867, 876, 886, 895, 908, 912, 916, + 920, 924, 928, 932, 936, 940, 944, 949, 953, 957, + 961, 965, 969, 974, 979, 983, 987, 991, 995, 999, + 1003, 1007, 1011, 1015, 1019, 1023, 1027, 1031, 1035, 1039, + 1043, 1047, 1051, 1065, 1066, 1096, 1115, 1136, 1164, 1221, + 1228, 1232, 1236, 1240, 1244, 1248, 1252, 1256, 1265, 1269, + 1274, 1277, 1282, 1287, 1292, 1297, 1300, 1305, 1308, 1313, + 1318, 1321, 1326, 1331, 1336, 1341, 1346, 1351, 1356, 1359, + 1364, 1369, 1374, 1379, 1382, 1387, 1392, 1397, 1410, 1423, + 1436, 1449, 1462, 1488, 1516, 1528, 1548, 1575, 1581, 1586, + 1591, 1600, 1605, 1609, 1613, 1617, 1621, 1625, 1629, 1634, + 1639, 1651, 1657, 1661, 1665, 1676, 1685, 1686, 1693, 1698, + 1703, 1757, 1764, 1772, 1809, 1813, 1820, 1825, 1831, 1837, + 1843, 1850, 1860, 1864, 1868, 1872, 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, 2221, 2225, 2229, 2234, 2238, 2242, 2247, 2252, + 2256, 2260, 2264, 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, + 2500, 2507, 2514, 2521, 2528, 2535, 2542, 2549, 2556, 2563, + 2570, 2577, 2587, 2591, 2595, 2599, 2603, 2607, 2611, 2615, + 2620, 2625, 2630, 2634, 2638, 2642, 2646, 2651, 2656, 2660, + 2664, 2668, 2672, 2676, 2680, 2684, 2688, 2692, 2696, 2700, + 2704, 2708, 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, 2877, 2881, 2885, 2889, 2893, 2897, 2901, + 2905, 2909, 2913, 2917, 2921, 2925, 2929, 2933, 2937, 2941, + 2945, 2949, 2953, 2957, 2961, 2965, 2969, 2973, 2977, 2981, + 2985, 2992, 2996, 3000, 3004, 3008, 3015, 3020, 3025, 3031 }; // Print the state stack on the debug stream. @@ -7152,7 +7152,7 @@ namespace yy { } // yy #line 7154 "seclang-parser.cc" -#line 3039 "seclang-parser.yy" +#line 3038 "seclang-parser.yy" void yy::seclang_parser::error (const location_type& l, const std::string& m) { diff --git a/src/parser/seclang-parser.hh b/src/parser/seclang-parser.hh index ebb69e79..7cc96c7e 100644 --- a/src/parser/seclang-parser.hh +++ b/src/parser/seclang-parser.hh @@ -295,7 +295,6 @@ class Driver; #include "src/variables/session.h" #include "src/variables/status.h" - using namespace modsecurity; using namespace modsecurity::variables; using namespace modsecurity::Utils; @@ -348,7 +347,7 @@ using namespace modsecurity::operators; a = std::move(c); -#line 352 "seclang-parser.hh" +#line 351 "seclang-parser.hh" # include # include // std::abort @@ -482,7 +481,7 @@ using namespace modsecurity::operators; #endif namespace yy { -#line 486 "seclang-parser.hh" +#line 485 "seclang-parser.hh" @@ -8112,7 +8111,7 @@ switch (yytype) } } // yy -#line 8116 "seclang-parser.hh" +#line 8115 "seclang-parser.hh" diff --git a/src/parser/seclang-parser.yy b/src/parser/seclang-parser.yy index da635961..710ce719 100644 --- a/src/parser/seclang-parser.yy +++ b/src/parser/seclang-parser.yy @@ -257,7 +257,6 @@ class Driver; #include "src/variables/session.h" #include "src/variables/status.h" - using namespace modsecurity; using namespace modsecurity::variables; using namespace modsecurity::Utils; @@ -1081,7 +1080,7 @@ expression: } Operator *op = $3.release(); - std::unique_ptr rule(new Rule( + std::unique_ptr rule(new RuleWithOperator( /* op */ op, /* variables */ v, /* actions */ a, @@ -1101,7 +1100,7 @@ expression: v->push_back(i.release()); } - std::unique_ptr rule(new Rule( + std::unique_ptr rule(new RuleWithOperator( /* op */ $3.release(), /* variables */ v, /* actions */ NULL, @@ -1124,7 +1123,7 @@ expression: a->push_back(i.release()); } } - std::unique_ptr rule(new Rule( + std::unique_ptr rule(new RuleWithOperator( /* op */ NULL, /* variables */ NULL, /* actions */ a, diff --git a/src/rule.cc b/src/rule.cc index 11455ea1..d349efde 100644 --- a/src/rule.cc +++ b/src/rule.cc @@ -384,7 +384,7 @@ std::string RuleWithActions::msg(Transaction *t) { return m_msg->data(t); } int RuleWithActions::severity() const { return m_severity->m_severity; } -Rule::Rule(Operator *op, +RuleWithOperator::RuleWithOperator(Operator *op, variables::Variables *_variables, std::vector *actions, Transformations *transformations, @@ -399,7 +399,7 @@ Rule::Rule(Operator *op, m_unconditional(false) { /* */ } -Rule::~Rule() { +RuleWithOperator::~RuleWithOperator() { if (m_operator != NULL) { delete m_operator; } @@ -416,7 +416,7 @@ Rule::~Rule() { } -void Rule::updateMatchedVars(Transaction *trans, const std::string &key, +void RuleWithOperator::updateMatchedVars(Transaction *trans, const std::string &key, const std::string &value) { ms_dbg_a(trans, 9, "Matched vars updated."); trans->m_variableMatchedVar.set(value, trans->m_variableOffset); @@ -427,7 +427,7 @@ void Rule::updateMatchedVars(Transaction *trans, const std::string &key, } -void Rule::cleanMatchedVars(Transaction *trans) { +void RuleWithOperator::cleanMatchedVars(Transaction *trans) { ms_dbg_a(trans, 9, "Matched vars cleaned."); trans->m_variableMatchedVar.unset(); trans->m_variableMatchedVars.unset(); @@ -436,7 +436,8 @@ void Rule::cleanMatchedVars(Transaction *trans) { } -bool Rule::executeOperatorAt(Transaction *trans, const std::string &key, + +bool RuleWithOperator::executeOperatorAt(Transaction *trans, const std::string &key, std::string value, std::shared_ptr ruleMessage) { #if MSC_EXEC_CLOCK_ENABLED clock_t begin = clock(); @@ -465,7 +466,7 @@ bool Rule::executeOperatorAt(Transaction *trans, const std::string &key, } -void Rule::getVariablesExceptions(Transaction *t, +void RuleWithOperator::getVariablesExceptions(Transaction *t, variables::Variables *exclusion, variables::Variables *addition) { for (auto &a : t->m_rules->m_exceptions.m_variable_update_target_by_tag) { if (containsTag(*a.first.get(), t) == false) { @@ -511,10 +512,9 @@ void Rule::getVariablesExceptions(Transaction *t, } -inline void Rule::getFinalVars(variables::Variables *vars, +inline void RuleWithOperator::getFinalVars(variables::Variables *vars, variables::Variables *exclusion, Transaction *trans) { variables::Variables addition; - getVariablesExceptions(trans, exclusion, &addition); for (int i = 0; i < m_variables->size(); i++) { @@ -578,7 +578,7 @@ void RuleWithActions::executeAction(Transaction *trans, } -bool Rule::evaluate(Transaction *trans, +bool RuleWithOperator::evaluate(Transaction *trans, std::shared_ptr ruleMessage) { bool globalRet = false; variables::Variables *variables = this->m_variables; @@ -812,6 +812,7 @@ std::vector RuleWithActions::getActionsByName(const std::stri } -std::string Rule::getOperatorName() const { return m_operator->m_op; } +std::string RuleWithOperator::getOperatorName() const { return m_operator->m_op; } + } // namespace modsecurity diff --git a/src/rule_script.h b/src/rule_script.h index 84c5794e..62b03483 100644 --- a/src/rule_script.h +++ b/src/rule_script.h @@ -42,14 +42,14 @@ namespace modsecurity { using actions::Action; /** @ingroup ModSecurity_CPP_API */ -class RuleScript : public Rule { +class RuleScript : public RuleWithOperator { public: RuleScript(const std::string &name, std::vector *actions, Transformations *t, std::unique_ptr fileName, int lineNumber) - : Rule(NULL, NULL, actions, t, std::move(fileName), lineNumber), + : RuleWithOperator(NULL, NULL, actions, t, std::move(fileName), lineNumber), m_name(name) { } bool init(std::string *err); diff --git a/src/rules_set.cc b/src/rules_set.cc index 6dd6a854..e36730ff 100644 --- a/src/rules_set.cc +++ b/src/rules_set.cc @@ -153,7 +153,7 @@ int RulesSet::evaluate(int phase, Transaction *t) { + "' as request trough the utilization of an `allow' action."); } else { RuleBase *base = rule.get(); - Rule *ruleWithOperator = dynamic_cast(base); + RuleWithOperator *ruleWithOperator = dynamic_cast(base); if (m_exceptions.contains(ruleWithOperator->m_ruleId)) { ms_dbg_a(t, 9, "Skipped rule id '" + rule->getReference() \ + "'. Removed by an SecRuleRemove directive."); diff --git a/src/rules_set_phases.cc b/src/rules_set_phases.cc index 824caadf..d0c4e2d9 100644 --- a/src/rules_set_phases.cc +++ b/src/rules_set_phases.cc @@ -46,7 +46,7 @@ int RulesSetPhases::append(RulesSetPhases *from, std::ostringstream *err) { for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) { v.reserve(m_rulesAtPhase[i].size()); for (size_t z = 0; z < m_rulesAtPhase[i].size(); z++) { - Rule *rule_ckc = dynamic_cast(m_rulesAtPhase[i].at(z).get()); + RuleWithOperator *rule_ckc = dynamic_cast(m_rulesAtPhase[i].at(z).get()); if (!rule_ckc) { continue; } diff --git a/src/run_time_string.cc b/src/run_time_string.cc index 1cf91358..05378655 100644 --- a/src/run_time_string.cc +++ b/src/run_time_string.cc @@ -59,7 +59,7 @@ std::string RunTimeString::evaluate(Transaction *t, RuleBase *r) { } else if (z->m_var != NULL && t != NULL) { std::vector l; // FIXME: This cast should be removed. - Rule *rr = dynamic_cast(r); + RuleWithOperator *rr = dynamic_cast(r); z->m_var->evaluate(t, rr, &l); if (l.size() > 0) { s.append(l[0]->getValue()); diff --git a/src/variables/duration.cc b/src/variables/duration.cc index f35e417c..9df7e2cb 100644 --- a/src/variables/duration.cc +++ b/src/variables/duration.cc @@ -28,7 +28,7 @@ namespace modsecurity { namespace variables { void Duration::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { double e = utils::cpu_seconds() - transaction->m_creationTimeStamp; diff --git a/src/variables/duration.h b/src/variables/duration.h index d98bbc2d..4d4e7fbf 100644 --- a/src/variables/duration.h +++ b/src/variables/duration.h @@ -35,7 +35,7 @@ class Duration : public Variable { m_retName("DURATION") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_retName; }; diff --git a/src/variables/env.cc b/src/variables/env.cc index f9205219..6e1e2c06 100644 --- a/src/variables/env.cc +++ b/src/variables/env.cc @@ -33,7 +33,7 @@ namespace modsecurity { namespace variables { void Env::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { for (char **current = environ; *current; current++) { std::string env = std::string(*current); diff --git a/src/variables/env.h b/src/variables/env.h index 9a3d5952..87d7a9a0 100644 --- a/src/variables/env.h +++ b/src/variables/env.h @@ -34,7 +34,7 @@ class Env : public Variable { : Variable(_name) { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; }; diff --git a/src/variables/global.h b/src/variables/global.h index 679a610b..cd7e3acb 100644 --- a/src/variables/global.h +++ b/src/variables/global.h @@ -39,7 +39,7 @@ class Global_DictElement : public Variable { m_dictElement("GLOBAL:" + dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_global_collection->resolveMultiMatches( m_name, t->m_collections.m_global_collection_key, @@ -56,7 +56,7 @@ class Global_NoDictElement : public Variable { : Variable("GLOBAL") { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_global_collection->resolveMultiMatches("", t->m_collections.m_global_collection_key, @@ -72,7 +72,7 @@ class Global_DictElementRegexp : public VariableRegex { m_dictElement(dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_global_collection->resolveRegularExpression( m_dictElement, @@ -91,7 +91,7 @@ class Global_DynamicElement : public Variable { m_string(std::move(dictElement)) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_global_collection->resolveMultiMatches( diff --git a/src/variables/highest_severity.cc b/src/variables/highest_severity.cc index b4964ad3..e3e6d75b 100644 --- a/src/variables/highest_severity.cc +++ b/src/variables/highest_severity.cc @@ -27,7 +27,7 @@ namespace modsecurity { namespace variables { void HighestSeverity::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { transaction->m_variableHighestSeverityAction.assign( std::to_string(transaction->m_highestSeverityAction)); diff --git a/src/variables/highest_severity.h b/src/variables/highest_severity.h index 85025114..1af19169 100644 --- a/src/variables/highest_severity.h +++ b/src/variables/highest_severity.h @@ -35,7 +35,7 @@ class HighestSeverity : public Variable { { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; }; diff --git a/src/variables/ip.h b/src/variables/ip.h index b7cec4cd..bd24e987 100644 --- a/src/variables/ip.h +++ b/src/variables/ip.h @@ -39,7 +39,7 @@ class Ip_DictElement : public Variable { m_dictElement("IP:" + dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_ip_collection->resolveMultiMatches( m_name, t->m_collections.m_ip_collection_key, @@ -56,7 +56,7 @@ class Ip_NoDictElement : public Variable { : Variable("IP") { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_ip_collection->resolveMultiMatches("", t->m_collections.m_ip_collection_key, @@ -72,7 +72,7 @@ class Ip_DictElementRegexp : public VariableRegex { m_dictElement(dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_ip_collection->resolveRegularExpression( m_dictElement, t->m_collections.m_ip_collection_key, @@ -90,7 +90,7 @@ class Ip_DynamicElement : public Variable { m_string(std::move(dictElement)) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_ip_collection->resolveMultiMatches( diff --git a/src/variables/modsec_build.cc b/src/variables/modsec_build.cc index 52e7387e..2e850458 100644 --- a/src/variables/modsec_build.cc +++ b/src/variables/modsec_build.cc @@ -25,7 +25,7 @@ namespace modsecurity { namespace variables { void ModsecBuild::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { l->push_back(new VariableValue(&m_retName, &m_build)); diff --git a/src/variables/modsec_build.h b/src/variables/modsec_build.h index d94c475f..0e584f6a 100644 --- a/src/variables/modsec_build.h +++ b/src/variables/modsec_build.h @@ -44,7 +44,7 @@ class ModsecBuild : public Variable { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_build; diff --git a/src/variables/remote_user.cc b/src/variables/remote_user.cc index 64e848b8..bfe82894 100644 --- a/src/variables/remote_user.cc +++ b/src/variables/remote_user.cc @@ -37,7 +37,7 @@ namespace variables { void RemoteUser::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { size_t pos; std::string base64; diff --git a/src/variables/remote_user.h b/src/variables/remote_user.h index 5bd26a75..5a4bef6a 100644 --- a/src/variables/remote_user.h +++ b/src/variables/remote_user.h @@ -37,7 +37,7 @@ class RemoteUser : public Variable { m_retName("REMOTE_USER") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_retName; }; diff --git a/src/variables/resource.h b/src/variables/resource.h index b4c866df..9977be42 100644 --- a/src/variables/resource.h +++ b/src/variables/resource.h @@ -39,7 +39,7 @@ class Resource_DictElement : public Variable { m_dictElement("RESOURCE:" + dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_resource_collection->resolveMultiMatches( m_name, t->m_collections.m_resource_collection_key, @@ -56,7 +56,7 @@ class Resource_NoDictElement : public Variable { : Variable("RESOURCE") { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_resource_collection->resolveMultiMatches(m_name, t->m_collections.m_resource_collection_key, @@ -72,7 +72,7 @@ class Resource_DictElementRegexp : public VariableRegex { m_dictElement(dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_resource_collection->resolveRegularExpression( m_dictElement, t->m_collections.m_resource_collection_key, @@ -90,7 +90,7 @@ class Resource_DynamicElement : public Variable { m_string(std::move(dictElement)) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_resource_collection->resolveMultiMatches( diff --git a/src/variables/rule.h b/src/variables/rule.h index 3562fac3..58701277 100644 --- a/src/variables/rule.h +++ b/src/variables/rule.h @@ -38,9 +38,9 @@ class Rule_DictElement : public VariableDictElement { \ : VariableDictElement(std::string("RULE"), dictElement) { } static void id(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { - Rule *r = rule; + RuleWithOperator *r = rule; while (r && r->m_ruleId == 0) { r = r->m_chainedRuleParent; @@ -63,9 +63,9 @@ class Rule_DictElement : public VariableDictElement { \ static void rev(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { - Rule *r = rule; + RuleWithOperator *r = rule; while (r && r->m_rev.empty()) { r = r->m_chainedRuleParent; @@ -89,9 +89,9 @@ class Rule_DictElement : public VariableDictElement { \ static void severity(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { - Rule *r = rule; + RuleWithOperator *r = rule; while (r && !r->hasSeverity()) { r = r->m_chainedRuleParent; @@ -113,9 +113,9 @@ class Rule_DictElement : public VariableDictElement { \ static void logData(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { - Rule *r = rule; + RuleWithOperator *r = rule; while (r && !r->hasLogData()) { r = r->m_chainedRuleParent; @@ -136,9 +136,9 @@ class Rule_DictElement : public VariableDictElement { \ } static void msg(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { - Rule *r = rule; + RuleWithOperator *r = rule; while (r && !r->hasMsg()) { r = r->m_chainedRuleParent; @@ -159,7 +159,7 @@ class Rule_DictElement : public VariableDictElement { \ } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { if (m_dictElement == "id") { id(t, rule, l); @@ -198,7 +198,7 @@ class Rule_DictElementRegexp : public VariableRegex { : VariableRegex("RULE", regex) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { if (Utils::regex_search("id", m_r) > 0) { Rule_DictElement::id(t, rule, l); @@ -230,7 +230,7 @@ class Rule_NoDictElement : public Variable { : Variable("RULE") { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { Rule_DictElement::id(t, rule, l); Rule_DictElement::rev(t, rule, l); diff --git a/src/variables/session.h b/src/variables/session.h index c875755f..98d8605c 100644 --- a/src/variables/session.h +++ b/src/variables/session.h @@ -39,7 +39,7 @@ class Session_DictElement : public Variable { m_dictElement("SESSION:" + dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_session_collection->resolveMultiMatches( m_name, t->m_collections.m_session_collection_key, @@ -56,7 +56,7 @@ class Session_NoDictElement : public Variable { : Variable("SESSION") { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_session_collection->resolveMultiMatches("", t->m_collections.m_session_collection_key, @@ -72,7 +72,7 @@ class Session_DictElementRegexp : public VariableRegex { m_dictElement(dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_session_collection->resolveRegularExpression( m_dictElement, t->m_collections.m_session_collection_key, @@ -90,7 +90,7 @@ class Session_DynamicElement : public Variable { m_string(std::move(dictElement)) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_session_collection->resolveMultiMatches( diff --git a/src/variables/time.cc b/src/variables/time.cc index 609f88b6..a7f0eb64 100644 --- a/src/variables/time.cc +++ b/src/variables/time.cc @@ -34,7 +34,7 @@ namespace modsecurity { namespace variables { void Time::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { char tstr[200]; diff --git a/src/variables/time.h b/src/variables/time.h index a56a85aa..b0ea5493 100644 --- a/src/variables/time.h +++ b/src/variables/time.h @@ -36,7 +36,7 @@ class Time : public Variable { m_retName("TIME") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_retName; }; diff --git a/src/variables/time_day.cc b/src/variables/time_day.cc index 678a8608..473cffbd 100644 --- a/src/variables/time_day.cc +++ b/src/variables/time_day.cc @@ -34,7 +34,7 @@ namespace modsecurity { namespace variables { void TimeDay::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; diff --git a/src/variables/time_day.h b/src/variables/time_day.h index 25dec66d..0b2ac056 100644 --- a/src/variables/time_day.h +++ b/src/variables/time_day.h @@ -35,7 +35,7 @@ class TimeDay : public Variable { m_retName("TIME_DAY") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_retName; }; diff --git a/src/variables/time_epoch.cc b/src/variables/time_epoch.cc index d1f4a399..38029a3c 100644 --- a/src/variables/time_epoch.cc +++ b/src/variables/time_epoch.cc @@ -34,7 +34,7 @@ namespace modsecurity { namespace variables { void TimeEpoch::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { transaction->m_variableTimeEpoch.assign( std::to_string(std::time(nullptr))); diff --git a/src/variables/time_epoch.h b/src/variables/time_epoch.h index 21534127..3d009595 100644 --- a/src/variables/time_epoch.h +++ b/src/variables/time_epoch.h @@ -35,7 +35,7 @@ class TimeEpoch : public Variable { m_retName("TIME_EPOCH") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_retName; }; diff --git a/src/variables/time_hour.cc b/src/variables/time_hour.cc index 4e15c7c4..05f3ec98 100644 --- a/src/variables/time_hour.cc +++ b/src/variables/time_hour.cc @@ -34,7 +34,7 @@ namespace modsecurity { namespace variables { void TimeHour::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; diff --git a/src/variables/time_hour.h b/src/variables/time_hour.h index bc3b1b5b..862d0819 100644 --- a/src/variables/time_hour.h +++ b/src/variables/time_hour.h @@ -35,7 +35,7 @@ class TimeHour : public Variable { m_retName("TIME_HOUR") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_retName; }; diff --git a/src/variables/time_min.cc b/src/variables/time_min.cc index 49124219..c8ec9cf8 100644 --- a/src/variables/time_min.cc +++ b/src/variables/time_min.cc @@ -34,7 +34,7 @@ namespace modsecurity { namespace variables { void TimeMin::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; diff --git a/src/variables/time_min.h b/src/variables/time_min.h index c77ff8c1..92f662a9 100644 --- a/src/variables/time_min.h +++ b/src/variables/time_min.h @@ -35,7 +35,7 @@ class TimeMin : public Variable { m_retName("TIME_MIN") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_retName; }; diff --git a/src/variables/time_mon.cc b/src/variables/time_mon.cc index 2ec71dbd..93f90f8a 100644 --- a/src/variables/time_mon.cc +++ b/src/variables/time_mon.cc @@ -34,7 +34,7 @@ namespace modsecurity { namespace variables { void TimeMon::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; diff --git a/src/variables/time_mon.h b/src/variables/time_mon.h index 00b4db9b..fe67a303 100644 --- a/src/variables/time_mon.h +++ b/src/variables/time_mon.h @@ -35,7 +35,7 @@ class TimeMon : public Variable { m_retName("TIME_MON") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_retName; }; diff --git a/src/variables/time_sec.cc b/src/variables/time_sec.cc index 20a2435c..4de09448 100644 --- a/src/variables/time_sec.cc +++ b/src/variables/time_sec.cc @@ -34,7 +34,7 @@ namespace modsecurity { namespace variables { void TimeSec::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; diff --git a/src/variables/time_sec.h b/src/variables/time_sec.h index e0c7407e..9cee914e 100644 --- a/src/variables/time_sec.h +++ b/src/variables/time_sec.h @@ -35,7 +35,7 @@ class TimeSec : public Variable { m_retName("TIME_SEC") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_retName; }; diff --git a/src/variables/time_wday.cc b/src/variables/time_wday.cc index ded48255..4036042a 100644 --- a/src/variables/time_wday.cc +++ b/src/variables/time_wday.cc @@ -34,7 +34,7 @@ namespace modsecurity { namespace variables { void TimeWDay::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; diff --git a/src/variables/time_wday.h b/src/variables/time_wday.h index d883c6c3..30ef068c 100644 --- a/src/variables/time_wday.h +++ b/src/variables/time_wday.h @@ -35,7 +35,7 @@ class TimeWDay : public Variable { m_retName("TIME_WDAY") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_retName; }; diff --git a/src/variables/time_year.cc b/src/variables/time_year.cc index 5441f175..2a96221b 100644 --- a/src/variables/time_year.cc +++ b/src/variables/time_year.cc @@ -34,7 +34,7 @@ namespace modsecurity { namespace variables { void TimeYear::evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { char tstr[200]; struct tm timeinfo; diff --git a/src/variables/time_year.h b/src/variables/time_year.h index ebff4b0e..06f5ee14 100644 --- a/src/variables/time_year.h +++ b/src/variables/time_year.h @@ -35,7 +35,7 @@ class TimeYear : public Variable { m_retName("TIME_YEAR") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; std::string m_retName; }; diff --git a/src/variables/tx.h b/src/variables/tx.h index 5cc7f01f..1e5f68d2 100644 --- a/src/variables/tx.h +++ b/src/variables/tx.h @@ -39,7 +39,7 @@ class Tx_DictElement : public Variable { m_dictElement("TX:" + dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_tx_collection->resolveMultiMatches( m_name, l, m_keyExclusion); @@ -55,7 +55,7 @@ class Tx_NoDictElement : public Variable { : Variable("TX") { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_tx_collection->resolveMultiMatches("", l, m_keyExclusion); @@ -70,7 +70,7 @@ class Tx_DictElementRegexp : public VariableRegex { m_dictElement(dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_tx_collection->resolveRegularExpression( m_dictElement, l, m_keyExclusion); @@ -87,7 +87,7 @@ class Tx_DynamicElement : public Variable { m_string(std::move(dictElement)) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_tx_collection->resolveMultiMatches(string, l, diff --git a/src/variables/user.h b/src/variables/user.h index 5fb6e7c9..c9ba87c0 100644 --- a/src/variables/user.h +++ b/src/variables/user.h @@ -39,7 +39,7 @@ class User_DictElement : public Variable { m_dictElement("USER:" + dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_user_collection->resolveMultiMatches( m_name, t->m_collections.m_user_collection_key, @@ -56,7 +56,7 @@ class User_NoDictElement : public Variable { : Variable("USER") { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_user_collection->resolveMultiMatches(m_name, t->m_collections.m_user_collection_key, @@ -72,7 +72,7 @@ class User_DictElementRegexp : public VariableRegex { m_dictElement(dictElement) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { t->m_collections.m_user_collection->resolveRegularExpression( m_dictElement, t->m_collections.m_user_collection_key, @@ -90,7 +90,7 @@ class User_DynamicElement : public Variable { m_string(std::move(dictElement)) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { std::string string = m_string->evaluate(t); t->m_collections.m_user_collection->resolveMultiMatches( diff --git a/src/variables/variable.h b/src/variables/variable.h index a1a0e238..d7189111 100644 --- a/src/variables/variable.h +++ b/src/variables/variable.h @@ -49,7 +49,7 @@ class n ## _DictElementRegexp : public VariableRegex { \ : VariableRegex(#N, regex) { } \ \ void evaluate(Transaction *transaction, \ - Rule *rule, \ + RuleWithOperator *rule, \ std::vector *l) override { \ transaction-> e .resolveRegularExpression(&m_r, l, \ m_keyExclusion); \ @@ -64,7 +64,7 @@ class n ## _DictElement : public VariableDictElement { \ : VariableDictElement(#N, dictElement) { } \ \ void evaluate(Transaction *transaction, \ - Rule *rule, \ + RuleWithOperator *rule, \ std::vector *l) override { \ transaction-> e .resolve(m_dictElement, l); \ } \ @@ -78,7 +78,7 @@ class n ## _NoDictElement : public Variable { \ : Variable(#N) { } \ \ void evaluate(Transaction *transaction, \ - Rule *rule, \ + RuleWithOperator *rule, \ std::vector *l) override { \ transaction-> e .resolve(l, m_keyExclusion); \ } \ @@ -92,7 +92,7 @@ class n : public Variable { \ : Variable(#N) { } \ \ void evaluate(Transaction *transaction, \ - Rule *rule, \ + RuleWithOperator *rule, \ std::vector *l) override { \ transaction-> e .evaluate(l); \ } \ @@ -550,7 +550,7 @@ class Variable : public VariableMonkeyResolution { virtual void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) = 0; @@ -630,7 +630,7 @@ class VariableModificatorExclusion : public Variable { m_base(std::move(var)) { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { m_base->evaluate(t, rule, l); } @@ -648,7 +648,7 @@ class VariableModificatorCount : public Variable { } void evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { std::vector reslIn; VariableValue *val = NULL; diff --git a/src/variables/web_app_id.h b/src/variables/web_app_id.h index 4906d382..63947a30 100644 --- a/src/variables/web_app_id.h +++ b/src/variables/web_app_id.h @@ -36,7 +36,7 @@ class WebAppId : public Variable { : Variable("WEBAPPID") { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override { const std::string name("WEBAPPID"); const std::string rname = transaction->m_rules->m_secWebAppId.m_value; diff --git a/src/variables/xml.cc b/src/variables/xml.cc index b66224c2..137e0c78 100644 --- a/src/variables/xml.cc +++ b/src/variables/xml.cc @@ -48,12 +48,12 @@ namespace variables { #ifndef WITH_LIBXML2 void XML::evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { } #else void XML::evaluate(Transaction *t, - Rule *rule, + RuleWithOperator *rule, std::vector *l) { xmlXPathContextPtr xpathCtx; xmlXPathObjectPtr xpathObj; diff --git a/src/variables/xml.h b/src/variables/xml.h index 85b177c3..833cdd25 100644 --- a/src/variables/xml.h +++ b/src/variables/xml.h @@ -42,8 +42,8 @@ class XML_NoDictElement : public Variable { m_var(&m_name, &m_plain) { } - void evaluate(Transaction *t, - Rule *rule, + void evaluate(Transaction *transaction, + RuleWithOperator *rule, std::vector *l) override { l->push_back(new VariableValue(&m_var)); } @@ -59,7 +59,7 @@ class XML : public Variable { : Variable(_name) { } void evaluate(Transaction *transaction, - Rule *rule, + RuleWithOperator *rule, std::vector *l) override; };