From c9204a1c1fb7fa480ea73352f134fc9afda81c2c Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Tue, 26 Feb 2019 21:59:08 -0300 Subject: [PATCH] Moves rule* headers to src/ --- headers/modsecurity/actions/action.h | 4 +- headers/modsecurity/rules.h | 21 +- headers/modsecurity/rules_set_phases.h | 4 +- src/actions/accuracy.cc | 3 +- src/actions/block.cc | 3 +- src/actions/chain.cc | 2 +- src/actions/maturity.cc | 3 +- src/actions/phase.cc | 2 +- src/actions/rev.cc | 2 +- src/actions/rule_id.cc | 2 +- src/actions/set_env.cc | 2 +- src/actions/set_var.cc | 3 +- src/actions/ver.cc | 2 +- src/operators/detect_sqli.cc | 2 +- src/operators/detect_xss.cc | 2 +- src/operators/pm.cc | 2 +- src/operators/rbl.cc | 2 +- src/operators/rx.cc | 2 +- src/operators/rx_global.cc | 2 +- src/operators/verify_cc.cc | 2 +- src/operators/verify_cpf.cc | 2 +- src/operators/verify_ssn.cc | 2 +- src/operators/verify_svnr.cc | 2 +- src/parser/driver.cc | 2 +- src/parser/seclang-parser.cc | 956 +++++++++--------- src/parser/seclang-parser.hh | 10 +- src/parser/seclang-parser.yy | 6 +- {headers/modsecurity => src}/rule_marker.h | 0 src/rule_message.cc | 2 +- src/rule_script.h | 2 +- src/rule_unconditional.cc | 2 +- .../modsecurity => src}/rule_unconditional.h | 8 +- src/rule_with_actions.cc | 14 +- .../modsecurity => src}/rule_with_actions.h | 9 +- src/rule_with_operator.cc | 14 +- .../modsecurity => src}/rule_with_operator.h | 10 +- src/rules.cc | 2 +- src/rules_set.cc | 2 +- src/rules_set_phases.cc | 25 +- src/run_time_string.cc | 2 +- src/transaction.cc | 1 + src/variables/rule.h | 3 +- src/variables/xml.cc | 2 +- 43 files changed, 581 insertions(+), 564 deletions(-) rename {headers/modsecurity => src}/rule_marker.h (100%) rename {headers/modsecurity => src}/rule_unconditional.h (87%) rename {headers/modsecurity => src}/rule_with_actions.h (99%) rename {headers/modsecurity => src}/rule_with_operator.h (90%) diff --git a/headers/modsecurity/actions/action.h b/headers/modsecurity/actions/action.h index 72a95069..fd728f66 100644 --- a/headers/modsecurity/actions/action.h +++ b/headers/modsecurity/actions/action.h @@ -23,7 +23,6 @@ #include "modsecurity/intervention.h" #include "modsecurity/rule.h" -#include "modsecurity/rule_with_actions.h" #ifndef HEADERS_MODSECURITY_ACTIONS_ACTION_H_ #define HEADERS_MODSECURITY_ACTIONS_ACTION_H_ @@ -32,7 +31,8 @@ namespace modsecurity { class Transaction; -class RuleWithOperator; +class RuleWithActions; + namespace actions { diff --git a/headers/modsecurity/rules.h b/headers/modsecurity/rules.h index 43198b7c..7b3346dd 100644 --- a/headers/modsecurity/rules.h +++ b/headers/modsecurity/rules.h @@ -27,28 +27,35 @@ #endif #include "modsecurity/rule.h" -#include "modsecurity/rule_with_operator.h" -#include "modsecurity/rule_with_actions.h" + #ifndef HEADERS_MODSECURITY_RULES_H_ #define HEADERS_MODSECURITY_RULES_H_ - #ifdef __cplusplus namespace modsecurity { - +namespace actions { +namespace transformations { +class Transformation; +} +} class Rules { public: void dump() const; - int append(Rules *from, const std::vector &ids, std::ostringstream *err); + int append(Rules *from, + const std::vector &ids, + std::ostringstream *err); bool insert(const std::shared_ptr &rule); - bool insert(std::shared_ptr rule, const std::vector *ids, std::ostringstream *err); + bool insert(std::shared_ptr rule, + const std::vector *ids, + std::ostringstream *err); size_t size() const; + std::shared_ptr operator[](int index) const; std::shared_ptr at(int index) const; @@ -58,6 +65,8 @@ class Rules { std::vector > m_defaultTransformations; std::vector > m_rules; + void dump(); + }; diff --git a/headers/modsecurity/rules_set_phases.h b/headers/modsecurity/rules_set_phases.h index 59d3fdf3..17844ce0 100644 --- a/headers/modsecurity/rules_set_phases.h +++ b/headers/modsecurity/rules_set_phases.h @@ -48,8 +48,8 @@ class RulesSetPhases { int append(RulesSetPhases *from, std::ostringstream *err); void dump() const; - Rules *operator[](int index) { return &m_rulesAtPhase[index]; } - Rules *at(int index) { return &m_rulesAtPhase[index]; } + Rules *operator[](int index); + Rules *at(int index); private: Rules m_rulesAtPhase[8]; diff --git a/src/actions/accuracy.cc b/src/actions/accuracy.cc index 66cb913d..51514fb0 100644 --- a/src/actions/accuracy.cc +++ b/src/actions/accuracy.cc @@ -21,7 +21,8 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" + namespace modsecurity { namespace actions { diff --git a/src/actions/block.cc b/src/actions/block.cc index c20cf6ab..b929d228 100644 --- a/src/actions/block.cc +++ b/src/actions/block.cc @@ -24,7 +24,8 @@ #include "modsecurity/rule.h" #include "modsecurity/intervention.h" #include "src/actions/data/status.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" + namespace modsecurity { namespace actions { diff --git a/src/actions/chain.cc b/src/actions/chain.cc index b2ac0990..db9e6c68 100644 --- a/src/actions/chain.cc +++ b/src/actions/chain.cc @@ -20,7 +20,7 @@ #include "modsecurity/transaction.h" #include "modsecurity/rule.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/actions/maturity.cc b/src/actions/maturity.cc index 1d6ae4a0..b419d385 100644 --- a/src/actions/maturity.cc +++ b/src/actions/maturity.cc @@ -21,7 +21,8 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" + namespace modsecurity { namespace actions { diff --git a/src/actions/phase.cc b/src/actions/phase.cc index 4cba84c4..b6382a43 100644 --- a/src/actions/phase.cc +++ b/src/actions/phase.cc @@ -22,7 +22,7 @@ #include "modsecurity/rule.h" #include "modsecurity/modsecurity.h" #include "src/utils/string.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/actions/rev.cc b/src/actions/rev.cc index e2ec45e7..4e2d94e0 100644 --- a/src/actions/rev.cc +++ b/src/actions/rev.cc @@ -21,7 +21,7 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/actions/rule_id.cc b/src/actions/rule_id.cc index 40424933..7457e091 100644 --- a/src/actions/rule_id.cc +++ b/src/actions/rule_id.cc @@ -20,7 +20,7 @@ #include "modsecurity/transaction.h" #include "modsecurity/rule.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/actions/set_env.cc b/src/actions/set_env.cc index 2d92d48c..0079c68d 100644 --- a/src/actions/set_env.cc +++ b/src/actions/set_env.cc @@ -21,7 +21,7 @@ #include "modsecurity/transaction.h" #include "modsecurity/rule.h" #include "src/utils/string.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/actions/set_var.cc b/src/actions/set_var.cc index 2ae13606..5c289d98 100644 --- a/src/actions/set_var.cc +++ b/src/actions/set_var.cc @@ -30,7 +30,8 @@ #include "src/variables/tx.h" #include "src/variables/user.h" #include "src/variables/variable.h" -#include "modsecurity/rule_with_operator.h" +#include "src/rule_with_operator.h" + namespace modsecurity { namespace actions { diff --git a/src/actions/ver.cc b/src/actions/ver.cc index caf3d08b..a169bb23 100644 --- a/src/actions/ver.cc +++ b/src/actions/ver.cc @@ -21,7 +21,7 @@ #include "modsecurity/actions/action.h" #include "modsecurity/transaction.h" #include "modsecurity/rule.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/operators/detect_sqli.cc b/src/operators/detect_sqli.cc index b79e0a0b..66a32a5d 100644 --- a/src/operators/detect_sqli.cc +++ b/src/operators/detect_sqli.cc @@ -20,7 +20,7 @@ #include "src/operators/operator.h" #include "others/libinjection/src/libinjection.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/operators/detect_xss.cc b/src/operators/detect_xss.cc index af5e57ab..4819a11f 100644 --- a/src/operators/detect_xss.cc +++ b/src/operators/detect_xss.cc @@ -19,7 +19,7 @@ #include "src/operators/operator.h" #include "others/libinjection/src/libinjection.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/operators/pm.cc b/src/operators/pm.cc index b673efac..6a125ce8 100644 --- a/src/operators/pm.cc +++ b/src/operators/pm.cc @@ -28,7 +28,7 @@ #include "src/operators/operator.h" #include "src/utils/acmp.h" #include "src/utils/string.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/operators/rbl.cc b/src/operators/rbl.cc index 0628dc18..b1fc25a2 100644 --- a/src/operators/rbl.cc +++ b/src/operators/rbl.cc @@ -25,7 +25,7 @@ #include "modsecurity/rules_set.h" #include "src/operators/operator.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/operators/rx.cc b/src/operators/rx.cc index bedf9ac1..4890db66 100644 --- a/src/operators/rx.cc +++ b/src/operators/rx.cc @@ -22,7 +22,7 @@ #include "src/operators/operator.h" #include "modsecurity/rule.h" #include "modsecurity/rule_message.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/operators/rx_global.cc b/src/operators/rx_global.cc index 47e40bfa..dc5a9d8a 100644 --- a/src/operators/rx_global.cc +++ b/src/operators/rx_global.cc @@ -20,7 +20,7 @@ #include #include "src/operators/operator.h" -#include "modsecurity/rule.h" +#include "src/rule_with_actions.h" #include "modsecurity/rule_message.h" namespace modsecurity { diff --git a/src/operators/verify_cc.cc b/src/operators/verify_cc.cc index 2ca93199..1804d5f7 100644 --- a/src/operators/verify_cc.cc +++ b/src/operators/verify_cc.cc @@ -21,7 +21,7 @@ #include #include "src/operators/operator.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" #if PCRE_HAVE_JIT diff --git a/src/operators/verify_cpf.cc b/src/operators/verify_cpf.cc index edac33a9..1ad3bc43 100644 --- a/src/operators/verify_cpf.cc +++ b/src/operators/verify_cpf.cc @@ -19,7 +19,7 @@ #include #include "src/operators/operator.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/operators/verify_ssn.cc b/src/operators/verify_ssn.cc index 3a5a69d9..706d76d1 100644 --- a/src/operators/verify_ssn.cc +++ b/src/operators/verify_ssn.cc @@ -20,7 +20,7 @@ #include #include "src/operators/operator.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/operators/verify_svnr.cc b/src/operators/verify_svnr.cc index 075c5989..8a444ac1 100644 --- a/src/operators/verify_svnr.cc +++ b/src/operators/verify_svnr.cc @@ -9,7 +9,7 @@ #include "modsecurity/rule_message.h" #include "modsecurity/rules_set_properties.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { namespace operators { diff --git a/src/parser/driver.cc b/src/parser/driver.cc index 0d4cd55a..66764cd7 100644 --- a/src/parser/driver.cc +++ b/src/parser/driver.cc @@ -18,7 +18,7 @@ #include "modsecurity/rules_set_properties.h" #include "src/parser/seclang-parser.hh" #include "modsecurity/audit_log.h" -#include "modsecurity/rule_marker.h" +#include "src/rule_marker.h" using modsecurity::audit_log::AuditLog; using modsecurity::RuleWithOperator; diff --git a/src/parser/seclang-parser.cc b/src/parser/seclang-parser.cc index 46ca0d34..ff96da36 100644 --- a/src/parser/seclang-parser.cc +++ b/src/parser/seclang-parser.cc @@ -42,7 +42,7 @@ // Unqualified %code blocks. -#line 325 "seclang-parser.yy" +#line 327 "seclang-parser.yy" #include "src/parser/driver.h" @@ -1314,7 +1314,7 @@ namespace yy { // User initialization code. -#line 318 "seclang-parser.yy" +#line 320 "seclang-parser.yy" { // Initialize the initial location. yyla.location.begin.filename = yyla.location.end.filename = new std::string(driver.file); @@ -1685,7 +1685,7 @@ namespace yy { switch (yyn) { case 2: // input: "end of file" -#line 711 "seclang-parser.yy" +#line 713 "seclang-parser.yy" { return 0; } @@ -1693,7 +1693,7 @@ namespace yy { break; case 6: // audit_log: "CONFIG_DIR_AUDIT_DIR_MOD" -#line 724 "seclang-parser.yy" +#line 726 "seclang-parser.yy" { driver.m_auditLog->setStorageDirMode(strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 8)); } @@ -1701,7 +1701,7 @@ namespace yy { break; case 7: // audit_log: "CONFIG_DIR_AUDIT_DIR" -#line 730 "seclang-parser.yy" +#line 732 "seclang-parser.yy" { driver.m_auditLog->setStorageDir(yystack_[0].value.as < std::string > ()); } @@ -1709,7 +1709,7 @@ namespace yy { break; case 8: // audit_log: "CONFIG_DIR_AUDIT_ENG" "CONFIG_VALUE_RELEVANT_ONLY" -#line 736 "seclang-parser.yy" +#line 738 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::RelevantOnlyAuditLogStatus); } @@ -1717,7 +1717,7 @@ namespace yy { break; case 9: // audit_log: "CONFIG_DIR_AUDIT_ENG" "CONFIG_VALUE_OFF" -#line 740 "seclang-parser.yy" +#line 742 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::OffAuditLogStatus); } @@ -1725,7 +1725,7 @@ namespace yy { break; case 10: // audit_log: "CONFIG_DIR_AUDIT_ENG" "CONFIG_VALUE_ON" -#line 744 "seclang-parser.yy" +#line 746 "seclang-parser.yy" { driver.m_auditLog->setStatus(modsecurity::audit_log::AuditLog::OnAuditLogStatus); } @@ -1733,7 +1733,7 @@ namespace yy { break; case 11: // audit_log: "CONFIG_DIR_AUDIT_FLE_MOD" -#line 750 "seclang-parser.yy" +#line 752 "seclang-parser.yy" { driver.m_auditLog->setFileMode(strtol(yystack_[0].value.as < std::string > ().c_str(), NULL, 8)); } @@ -1741,7 +1741,7 @@ namespace yy { break; case 12: // audit_log: "CONFIG_DIR_AUDIT_LOG2" -#line 756 "seclang-parser.yy" +#line 758 "seclang-parser.yy" { driver.m_auditLog->setFilePath2(yystack_[0].value.as < std::string > ()); } @@ -1749,7 +1749,7 @@ namespace yy { break; case 13: // audit_log: "CONFIG_DIR_AUDIT_LOG_P" -#line 762 "seclang-parser.yy" +#line 764 "seclang-parser.yy" { driver.m_auditLog->setParts(yystack_[0].value.as < std::string > ()); } @@ -1757,7 +1757,7 @@ namespace yy { break; case 14: // audit_log: "CONFIG_DIR_AUDIT_LOG" -#line 768 "seclang-parser.yy" +#line 770 "seclang-parser.yy" { driver.m_auditLog->setFilePath1(yystack_[0].value.as < std::string > ()); } @@ -1765,7 +1765,7 @@ namespace yy { break; case 15: // audit_log: CONFIG_DIR_AUDIT_LOG_FMT JSON -#line 773 "seclang-parser.yy" +#line 775 "seclang-parser.yy" { driver.m_auditLog->setFormat(modsecurity::audit_log::AuditLog::JSONAuditLogFormat); } @@ -1773,7 +1773,7 @@ namespace yy { break; case 16: // audit_log: CONFIG_DIR_AUDIT_LOG_FMT NATIVE -#line 778 "seclang-parser.yy" +#line 780 "seclang-parser.yy" { driver.m_auditLog->setFormat(modsecurity::audit_log::AuditLog::NativeAuditLogFormat); } @@ -1781,7 +1781,7 @@ namespace yy { break; case 17: // audit_log: "CONFIG_DIR_AUDIT_STS" -#line 784 "seclang-parser.yy" +#line 786 "seclang-parser.yy" { std::string relevant_status(yystack_[0].value.as < std::string > ()); driver.m_auditLog->setRelevantStatus(relevant_status); @@ -1790,7 +1790,7 @@ namespace yy { break; case 18: // audit_log: "CONFIG_DIR_AUDIT_TPE" "CONFIG_VALUE_SERIAL" -#line 791 "seclang-parser.yy" +#line 793 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::SerialAuditLogType); } @@ -1798,7 +1798,7 @@ namespace yy { break; case 19: // audit_log: "CONFIG_DIR_AUDIT_TPE" "CONFIG_VALUE_PARALLEL" -#line 795 "seclang-parser.yy" +#line 797 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::ParallelAuditLogType); } @@ -1806,7 +1806,7 @@ namespace yy { break; case 20: // audit_log: "CONFIG_DIR_AUDIT_TPE" "CONFIG_VALUE_HTTPS" -#line 799 "seclang-parser.yy" +#line 801 "seclang-parser.yy" { driver.m_auditLog->setType(modsecurity::audit_log::AuditLog::HttpsAuditLogType); } @@ -1814,7 +1814,7 @@ namespace yy { break; case 21: // audit_log: "CONFIG_UPDLOAD_KEEP_FILES" "CONFIG_VALUE_ON" -#line 805 "seclang-parser.yy" +#line 807 "seclang-parser.yy" { driver.m_uploadKeepFiles = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -1822,7 +1822,7 @@ namespace yy { break; case 22: // audit_log: "CONFIG_UPDLOAD_KEEP_FILES" "CONFIG_VALUE_OFF" -#line 809 "seclang-parser.yy" +#line 811 "seclang-parser.yy" { driver.m_uploadKeepFiles = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -1830,7 +1830,7 @@ namespace yy { break; case 23: // audit_log: "CONFIG_UPDLOAD_KEEP_FILES" "CONFIG_VALUE_RELEVANT_ONLY" -#line 813 "seclang-parser.yy" +#line 815 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecUploadKeepFiles RelevantOnly is not currently supported. Accepted values are On or Off"); YYERROR; @@ -1839,7 +1839,7 @@ namespace yy { break; case 24: // audit_log: "CONFIG_UPLOAD_FILE_LIMIT" -#line 818 "seclang-parser.yy" +#line 820 "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); @@ -1848,7 +1848,7 @@ namespace yy { break; case 25: // audit_log: "CONFIG_UPLOAD_FILE_MODE" -#line 823 "seclang-parser.yy" +#line 825 "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); @@ -1857,7 +1857,7 @@ namespace yy { break; case 26: // audit_log: "CONFIG_UPLOAD_DIR" -#line 828 "seclang-parser.yy" +#line 830 "seclang-parser.yy" { driver.m_uploadDirectory.m_set = true; driver.m_uploadDirectory.m_value = yystack_[0].value.as < std::string > (); @@ -1866,7 +1866,7 @@ namespace yy { break; case 27: // audit_log: "CONFIG_UPDLOAD_SAVE_TMP_FILES" "CONFIG_VALUE_ON" -#line 833 "seclang-parser.yy" +#line 835 "seclang-parser.yy" { driver.m_tmpSaveUploadedFiles = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -1874,7 +1874,7 @@ namespace yy { break; case 28: // audit_log: "CONFIG_UPDLOAD_SAVE_TMP_FILES" "CONFIG_VALUE_OFF" -#line 837 "seclang-parser.yy" +#line 839 "seclang-parser.yy" { driver.m_tmpSaveUploadedFiles = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -1882,7 +1882,7 @@ namespace yy { break; case 29: // actions: "QUOTATION_MARK" actions_may_quoted "QUOTATION_MARK" -#line 844 "seclang-parser.yy" +#line 846 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[1].value.as < std::unique_ptr > > > ()); } @@ -1890,7 +1890,7 @@ namespace yy { break; case 30: // actions: actions_may_quoted -#line 848 "seclang-parser.yy" +#line 850 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); } @@ -1898,7 +1898,7 @@ namespace yy { break; case 31: // actions_may_quoted: actions_may_quoted "," act -#line 855 "seclang-parser.yy" +#line 857 "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 > ())); @@ -1908,7 +1908,7 @@ namespace yy { break; case 32: // actions_may_quoted: act -#line 861 "seclang-parser.yy" +#line 863 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); ACTION_INIT(yystack_[0].value.as < std::unique_ptr > (), yystack_[1].location) @@ -1919,7 +1919,7 @@ namespace yy { break; case 33: // op: op_before_init -#line 871 "seclang-parser.yy" +#line 873 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > () = std::move(yystack_[0].value.as < std::unique_ptr > ()); std::string error; @@ -1932,7 +1932,7 @@ namespace yy { break; case 34: // op: "NOT" op_before_init -#line 880 "seclang-parser.yy" +#line 882 "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; @@ -1946,7 +1946,7 @@ namespace yy { break; case 35: // op: run_time_string -#line 890 "seclang-parser.yy" +#line 892 "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; @@ -1959,7 +1959,7 @@ namespace yy { break; case 36: // op: "NOT" run_time_string -#line 899 "seclang-parser.yy" +#line 901 "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; @@ -1973,7 +1973,7 @@ namespace yy { break; case 37: // op_before_init: "OPERATOR_UNCONDITIONAL_MATCH" -#line 912 "seclang-parser.yy" +#line 914 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::UnconditionalMatch()); } @@ -1981,7 +1981,7 @@ namespace yy { break; case 38: // op_before_init: "OPERATOR_DETECT_SQLI" -#line 916 "seclang-parser.yy" +#line 918 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::DetectSQLi()); } @@ -1989,7 +1989,7 @@ namespace yy { break; case 39: // op_before_init: "OPERATOR_DETECT_XSS" -#line 920 "seclang-parser.yy" +#line 922 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::DetectXSS()); } @@ -1997,7 +1997,7 @@ namespace yy { break; case 40: // op_before_init: "OPERATOR_VALIDATE_URL_ENCODING" -#line 924 "seclang-parser.yy" +#line 926 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateUrlEncoding()); } @@ -2005,7 +2005,7 @@ namespace yy { break; case 41: // op_before_init: "OPERATOR_VALIDATE_UTF8_ENCODING" -#line 928 "seclang-parser.yy" +#line 930 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateUtf8Encoding()); } @@ -2013,7 +2013,7 @@ namespace yy { break; case 42: // op_before_init: "OPERATOR_INSPECT_FILE" run_time_string -#line 932 "seclang-parser.yy" +#line 934 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::InspectFile(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2021,7 +2021,7 @@ namespace yy { break; case 43: // op_before_init: "OPERATOR_FUZZY_HASH" run_time_string -#line 936 "seclang-parser.yy" +#line 938 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::FuzzyHash(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2029,7 +2029,7 @@ namespace yy { break; case 44: // op_before_init: "OPERATOR_VALIDATE_BYTE_RANGE" run_time_string -#line 940 "seclang-parser.yy" +#line 942 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateByteRange(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2037,7 +2037,7 @@ namespace yy { break; case 45: // op_before_init: "OPERATOR_VALIDATE_DTD" run_time_string -#line 944 "seclang-parser.yy" +#line 946 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateDTD(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2045,7 +2045,7 @@ namespace yy { break; case 46: // op_before_init: "OPERATOR_VALIDATE_HASH" run_time_string -#line 948 "seclang-parser.yy" +#line 950 "seclang-parser.yy" { /* $$ = new operators::ValidateHash($1); */ OPERATOR_NOT_SUPPORTED("ValidateHash", yystack_[2].location); @@ -2054,7 +2054,7 @@ namespace yy { break; case 47: // op_before_init: "OPERATOR_VALIDATE_SCHEMA" run_time_string -#line 953 "seclang-parser.yy" +#line 955 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ValidateSchema(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2062,7 +2062,7 @@ namespace yy { break; case 48: // op_before_init: "OPERATOR_VERIFY_CC" run_time_string -#line 957 "seclang-parser.yy" +#line 959 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifyCC(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2070,7 +2070,7 @@ namespace yy { break; case 49: // op_before_init: "OPERATOR_VERIFY_CPF" run_time_string -#line 961 "seclang-parser.yy" +#line 963 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifyCPF(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2078,7 +2078,7 @@ namespace yy { break; case 50: // op_before_init: "OPERATOR_VERIFY_SSN" run_time_string -#line 965 "seclang-parser.yy" +#line 967 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifySSN(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2086,7 +2086,7 @@ namespace yy { break; case 51: // op_before_init: "OPERATOR_VERIFY_SVNR" run_time_string -#line 969 "seclang-parser.yy" +#line 971 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::VerifySVNR(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2094,7 +2094,7 @@ namespace yy { break; case 52: // op_before_init: "OPERATOR_GSB_LOOKUP" run_time_string -#line 973 "seclang-parser.yy" +#line 975 "seclang-parser.yy" { /* $$ = new operators::GsbLookup($1); */ OPERATOR_NOT_SUPPORTED("GsbLookup", yystack_[2].location); @@ -2103,7 +2103,7 @@ namespace yy { break; case 53: // op_before_init: "OPERATOR_RSUB" run_time_string -#line 978 "seclang-parser.yy" +#line 980 "seclang-parser.yy" { /* $$ = new operators::Rsub($1); */ OPERATOR_NOT_SUPPORTED("Rsub", yystack_[2].location); @@ -2112,7 +2112,7 @@ namespace yy { break; case 54: // op_before_init: "OPERATOR_WITHIN" run_time_string -#line 983 "seclang-parser.yy" +#line 985 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Within(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2120,7 +2120,7 @@ namespace yy { break; case 55: // op_before_init: "OPERATOR_CONTAINS_WORD" run_time_string -#line 987 "seclang-parser.yy" +#line 989 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::ContainsWord(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2128,7 +2128,7 @@ namespace yy { break; case 56: // op_before_init: "OPERATOR_CONTAINS" run_time_string -#line 991 "seclang-parser.yy" +#line 993 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Contains(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2136,7 +2136,7 @@ namespace yy { break; case 57: // op_before_init: "OPERATOR_ENDS_WITH" run_time_string -#line 995 "seclang-parser.yy" +#line 997 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::EndsWith(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2144,7 +2144,7 @@ namespace yy { break; case 58: // op_before_init: "OPERATOR_EQ" run_time_string -#line 999 "seclang-parser.yy" +#line 1001 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Eq(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2152,7 +2152,7 @@ namespace yy { break; case 59: // op_before_init: "OPERATOR_GE" run_time_string -#line 1003 "seclang-parser.yy" +#line 1005 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Ge(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2160,7 +2160,7 @@ namespace yy { break; case 60: // op_before_init: "OPERATOR_GT" run_time_string -#line 1007 "seclang-parser.yy" +#line 1009 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Gt(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2168,7 +2168,7 @@ namespace yy { break; case 61: // op_before_init: "OPERATOR_IP_MATCH_FROM_FILE" run_time_string -#line 1011 "seclang-parser.yy" +#line 1013 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::IpMatchF(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2176,7 +2176,7 @@ namespace yy { break; case 62: // op_before_init: "OPERATOR_IP_MATCH" run_time_string -#line 1015 "seclang-parser.yy" +#line 1017 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::IpMatch(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2184,7 +2184,7 @@ namespace yy { break; case 63: // op_before_init: "OPERATOR_LE" run_time_string -#line 1019 "seclang-parser.yy" +#line 1021 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Le(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2192,7 +2192,7 @@ namespace yy { break; case 64: // op_before_init: "OPERATOR_LT" run_time_string -#line 1023 "seclang-parser.yy" +#line 1025 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Lt(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2200,7 +2200,7 @@ namespace yy { break; case 65: // op_before_init: "OPERATOR_PM_FROM_FILE" run_time_string -#line 1027 "seclang-parser.yy" +#line 1029 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::PmFromFile(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2208,7 +2208,7 @@ namespace yy { break; case 66: // op_before_init: "OPERATOR_PM" run_time_string -#line 1031 "seclang-parser.yy" +#line 1033 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Pm(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2216,7 +2216,7 @@ namespace yy { break; case 67: // op_before_init: "OPERATOR_RBL" run_time_string -#line 1035 "seclang-parser.yy" +#line 1037 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rbl(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2224,7 +2224,7 @@ namespace yy { break; case 68: // op_before_init: "OPERATOR_RX" run_time_string -#line 1039 "seclang-parser.yy" +#line 1041 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::Rx(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2232,7 +2232,7 @@ namespace yy { break; case 69: // op_before_init: "OPERATOR_RX_GLOBAL" run_time_string -#line 1043 "seclang-parser.yy" +#line 1045 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::RxGlobal(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2240,7 +2240,7 @@ namespace yy { break; case 70: // op_before_init: "OPERATOR_STR_EQ" run_time_string -#line 1047 "seclang-parser.yy" +#line 1049 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::StrEq(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2248,7 +2248,7 @@ namespace yy { break; case 71: // op_before_init: "OPERATOR_STR_MATCH" run_time_string -#line 1051 "seclang-parser.yy" +#line 1053 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::StrMatch(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2256,7 +2256,7 @@ namespace yy { break; case 72: // op_before_init: "OPERATOR_BEGINS_WITH" run_time_string -#line 1055 "seclang-parser.yy" +#line 1057 "seclang-parser.yy" { OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::BeginsWith(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -2264,7 +2264,7 @@ namespace yy { break; case 73: // op_before_init: "OPERATOR_GEOLOOKUP" -#line 1059 "seclang-parser.yy" +#line 1061 "seclang-parser.yy" { #if defined(WITH_GEOIP) or defined(WITH_MAXMIND) OPERATOR_CONTAINER(yylhs.value.as < std::unique_ptr > (), new operators::GeoLookup()); @@ -2279,7 +2279,7 @@ namespace yy { break; case 75: // expression: "DIRECTIVE" variables op actions -#line 1074 "seclang-parser.yy" +#line 1076 "seclang-parser.yy" { std::vector *a = new std::vector(); std::vector > *t = new std::vector >(); @@ -2315,7 +2315,7 @@ namespace yy { break; case 76: // expression: "DIRECTIVE" variables op -#line 1106 "seclang-parser.yy" +#line 1108 "seclang-parser.yy" { variables::Variables *v = new variables::Variables(); for (auto &i : *yystack_[1].value.as < std::unique_ptr > > > ().get()) { @@ -2338,7 +2338,7 @@ namespace yy { break; case 77: // expression: "CONFIG_DIR_SEC_ACTION" actions -#line 1125 "seclang-parser.yy" +#line 1127 "seclang-parser.yy" { std::vector *a = new std::vector(); std::vector > *t = new std::vector >(); @@ -2363,7 +2363,7 @@ namespace yy { break; case 78: // expression: "DIRECTIVE_SECRULESCRIPT" actions -#line 1146 "seclang-parser.yy" +#line 1148 "seclang-parser.yy" { std::string err; std::vector *a = new std::vector(); @@ -2397,7 +2397,7 @@ namespace yy { break; case 79: // expression: "CONFIG_DIR_SEC_DEFAULT_ACTION" actions -#line 1176 "seclang-parser.yy" +#line 1178 "seclang-parser.yy" { bool hasDisruptive = false; std::vector *actions = new std::vector(); @@ -2463,7 +2463,7 @@ namespace yy { break; case 80: // expression: "CONFIG_DIR_SEC_MARKER" -#line 1238 "seclang-parser.yy" +#line 1240 "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)), @@ -2474,7 +2474,7 @@ namespace yy { break; case 81: // expression: "CONFIG_DIR_RULE_ENG" "CONFIG_VALUE_OFF" -#line 1245 "seclang-parser.yy" +#line 1247 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::DisabledRuleEngine; } @@ -2482,7 +2482,7 @@ namespace yy { break; case 82: // expression: "CONFIG_DIR_RULE_ENG" "CONFIG_VALUE_ON" -#line 1249 "seclang-parser.yy" +#line 1251 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::EnabledRuleEngine; } @@ -2490,7 +2490,7 @@ namespace yy { break; case 83: // expression: "CONFIG_DIR_RULE_ENG" "CONFIG_VALUE_DETC" -#line 1253 "seclang-parser.yy" +#line 1255 "seclang-parser.yy" { driver.m_secRuleEngine = modsecurity::RulesSet::DetectionOnlyRuleEngine; } @@ -2498,7 +2498,7 @@ namespace yy { break; case 84: // expression: "CONFIG_DIR_REQ_BODY" "CONFIG_VALUE_ON" -#line 1257 "seclang-parser.yy" +#line 1259 "seclang-parser.yy" { driver.m_secRequestBodyAccess = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -2506,7 +2506,7 @@ namespace yy { break; case 85: // expression: "CONFIG_DIR_REQ_BODY" "CONFIG_VALUE_OFF" -#line 1261 "seclang-parser.yy" +#line 1263 "seclang-parser.yy" { driver.m_secRequestBodyAccess = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -2514,7 +2514,7 @@ namespace yy { break; case 86: // expression: "CONFIG_DIR_RES_BODY" "CONFIG_VALUE_ON" -#line 1265 "seclang-parser.yy" +#line 1267 "seclang-parser.yy" { driver.m_secResponseBodyAccess = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -2522,7 +2522,7 @@ namespace yy { break; case 87: // expression: "CONFIG_DIR_RES_BODY" "CONFIG_VALUE_OFF" -#line 1269 "seclang-parser.yy" +#line 1271 "seclang-parser.yy" { driver.m_secResponseBodyAccess = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -2530,7 +2530,7 @@ namespace yy { break; case 88: // expression: "CONFIG_SEC_ARGUMENT_SEPARATOR" -#line 1273 "seclang-parser.yy" +#line 1275 "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."); @@ -2543,7 +2543,7 @@ namespace yy { break; case 89: // expression: "CONFIG_COMPONENT_SIG" -#line 1282 "seclang-parser.yy" +#line 1284 "seclang-parser.yy" { driver.m_components.push_back(yystack_[0].value.as < std::string > ()); } @@ -2551,7 +2551,7 @@ namespace yy { break; case 90: // expression: "CONFIG_CONN_ENGINE" "CONFIG_VALUE_ON" -#line 1286 "seclang-parser.yy" +#line 1288 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecConnEngine is not yet supported."); YYERROR; @@ -2560,14 +2560,14 @@ namespace yy { break; case 91: // expression: "CONFIG_CONN_ENGINE" "CONFIG_VALUE_OFF" -#line 1291 "seclang-parser.yy" +#line 1293 "seclang-parser.yy" { } #line 2567 "seclang-parser.cc" break; case 92: // expression: "CONFIG_SEC_WEB_APP_ID" -#line 1294 "seclang-parser.yy" +#line 1296 "seclang-parser.yy" { driver.m_secWebAppId.m_value = yystack_[0].value.as < std::string > (); driver.m_secWebAppId.m_set = true; @@ -2576,7 +2576,7 @@ namespace yy { break; case 93: // expression: "CONFIG_SEC_SERVER_SIG" -#line 1299 "seclang-parser.yy" +#line 1301 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecServerSignature is not supported."); YYERROR; @@ -2585,7 +2585,7 @@ namespace yy { break; case 94: // expression: "CONFIG_SEC_CACHE_TRANSFORMATIONS" -#line 1304 "seclang-parser.yy" +#line 1306 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecCacheTransformations is not supported."); YYERROR; @@ -2594,7 +2594,7 @@ namespace yy { break; case 95: // expression: "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" "CONFIG_VALUE_ON" -#line 1309 "seclang-parser.yy" +#line 1311 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecDisableBackendCompression is not supported."); YYERROR; @@ -2603,14 +2603,14 @@ namespace yy { break; case 96: // expression: "CONFIG_SEC_DISABLE_BACKEND_COMPRESS" "CONFIG_VALUE_OFF" -#line 1314 "seclang-parser.yy" +#line 1316 "seclang-parser.yy" { } #line 2610 "seclang-parser.cc" break; case 97: // expression: "CONFIG_CONTENT_INJECTION" "CONFIG_VALUE_ON" -#line 1317 "seclang-parser.yy" +#line 1319 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecContentInjection is not yet supported."); YYERROR; @@ -2619,14 +2619,14 @@ namespace yy { break; case 98: // expression: "CONFIG_CONTENT_INJECTION" "CONFIG_VALUE_OFF" -#line 1322 "seclang-parser.yy" +#line 1324 "seclang-parser.yy" { } #line 2626 "seclang-parser.cc" break; case 99: // expression: "CONFIG_SEC_CHROOT_DIR" -#line 1325 "seclang-parser.yy" +#line 1327 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecChrootDir is not supported."); YYERROR; @@ -2635,7 +2635,7 @@ namespace yy { break; case 100: // expression: "CONFIG_SEC_HASH_ENGINE" "CONFIG_VALUE_ON" -#line 1330 "seclang-parser.yy" +#line 1332 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecHashEngine is not yet supported."); YYERROR; @@ -2644,14 +2644,14 @@ namespace yy { break; case 101: // expression: "CONFIG_SEC_HASH_ENGINE" "CONFIG_VALUE_OFF" -#line 1335 "seclang-parser.yy" +#line 1337 "seclang-parser.yy" { } #line 2651 "seclang-parser.cc" break; case 102: // expression: "CONFIG_SEC_HASH_KEY" -#line 1338 "seclang-parser.yy" +#line 1340 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashKey is not yet supported."); YYERROR; @@ -2660,7 +2660,7 @@ namespace yy { break; case 103: // expression: "CONFIG_SEC_HASH_PARAM" -#line 1343 "seclang-parser.yy" +#line 1345 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashParam is not yet supported."); YYERROR; @@ -2669,7 +2669,7 @@ namespace yy { break; case 104: // expression: "CONFIG_SEC_HASH_METHOD_RX" -#line 1348 "seclang-parser.yy" +#line 1350 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashMethodRx is not yet supported."); YYERROR; @@ -2678,7 +2678,7 @@ namespace yy { break; case 105: // expression: "CONFIG_SEC_HASH_METHOD_PM" -#line 1353 "seclang-parser.yy" +#line 1355 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecHashMethodPm is not yet supported."); YYERROR; @@ -2687,7 +2687,7 @@ namespace yy { break; case 106: // expression: "CONFIG_DIR_GSB_DB" -#line 1358 "seclang-parser.yy" +#line 1360 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecGsbLookupDb is not supported."); YYERROR; @@ -2696,7 +2696,7 @@ namespace yy { break; case 107: // expression: "CONFIG_SEC_GUARDIAN_LOG" -#line 1363 "seclang-parser.yy" +#line 1365 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecGuardianLog is not supported."); YYERROR; @@ -2705,7 +2705,7 @@ namespace yy { break; case 108: // expression: "CONFIG_SEC_INTERCEPT_ON_ERROR" "CONFIG_VALUE_ON" -#line 1368 "seclang-parser.yy" +#line 1370 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecInterceptOnError is not yet supported."); YYERROR; @@ -2714,14 +2714,14 @@ namespace yy { break; case 109: // expression: "CONFIG_SEC_INTERCEPT_ON_ERROR" "CONFIG_VALUE_OFF" -#line 1373 "seclang-parser.yy" +#line 1375 "seclang-parser.yy" { } #line 2721 "seclang-parser.cc" break; case 110: // expression: "CONFIG_SEC_CONN_R_STATE_LIMIT" -#line 1376 "seclang-parser.yy" +#line 1378 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecConnReadStateLimit is not yet supported."); YYERROR; @@ -2730,7 +2730,7 @@ namespace yy { break; case 111: // expression: "CONFIG_SEC_CONN_W_STATE_LIMIT" -#line 1381 "seclang-parser.yy" +#line 1383 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecConnWriteStateLimit is not yet supported."); YYERROR; @@ -2739,7 +2739,7 @@ namespace yy { break; case 112: // expression: "CONFIG_SEC_SENSOR_ID" -#line 1386 "seclang-parser.yy" +#line 1388 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecSensorId is not yet supported."); YYERROR; @@ -2748,7 +2748,7 @@ namespace yy { break; case 113: // expression: "CONFIG_SEC_RULE_INHERITANCE" "CONFIG_VALUE_ON" -#line 1391 "seclang-parser.yy" +#line 1393 "seclang-parser.yy" { driver.error(yystack_[2].location, "SecRuleInheritance is not yet supported."); YYERROR; @@ -2757,14 +2757,14 @@ namespace yy { break; case 114: // expression: "CONFIG_SEC_RULE_INHERITANCE" "CONFIG_VALUE_OFF" -#line 1396 "seclang-parser.yy" +#line 1398 "seclang-parser.yy" { } #line 2764 "seclang-parser.cc" break; case 115: // expression: "CONFIG_SEC_RULE_PERF_TIME" -#line 1399 "seclang-parser.yy" +#line 1401 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecRulePerfTime is not yet supported."); YYERROR; @@ -2773,7 +2773,7 @@ namespace yy { break; case 116: // expression: "CONFIG_SEC_STREAM_IN_BODY_INSPECTION" -#line 1404 "seclang-parser.yy" +#line 1406 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecStreamInBodyInspection is not supported."); YYERROR; @@ -2782,7 +2782,7 @@ namespace yy { break; case 117: // expression: "CONFIG_SEC_STREAM_OUT_BODY_INSPECTION" -#line 1409 "seclang-parser.yy" +#line 1411 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecStreamOutBodyInspection is not supported."); YYERROR; @@ -2791,7 +2791,7 @@ namespace yy { break; case 118: // expression: "CONFIG_SEC_RULE_REMOVE_BY_ID" -#line 1414 "seclang-parser.yy" +#line 1416 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.load(yystack_[0].value.as < std::string > (), &error) == false) { @@ -2808,7 +2808,7 @@ namespace yy { break; case 119: // expression: "CONFIG_SEC_RULE_REMOVE_BY_TAG" -#line 1427 "seclang-parser.yy" +#line 1429 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadRemoveRuleByTag(yystack_[0].value.as < std::string > (), &error) == false) { @@ -2825,7 +2825,7 @@ namespace yy { break; case 120: // expression: "CONFIG_SEC_RULE_REMOVE_BY_MSG" -#line 1440 "seclang-parser.yy" +#line 1442 "seclang-parser.yy" { std::string error; if (driver.m_exceptions.loadRemoveRuleByMsg(yystack_[0].value.as < std::string > (), &error) == false) { @@ -2842,7 +2842,7 @@ namespace yy { break; case 121: // expression: "CONFIG_SEC_RULE_UPDATE_TARGET_BY_TAG" variables_pre_process -#line 1453 "seclang-parser.yy" +#line 1455 "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) { @@ -2859,7 +2859,7 @@ namespace yy { break; case 122: // expression: "CONFIG_SEC_RULE_UPDATE_TARGET_BY_MSG" variables_pre_process -#line 1466 "seclang-parser.yy" +#line 1468 "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) { @@ -2876,7 +2876,7 @@ namespace yy { break; case 123: // expression: "CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID" variables_pre_process -#line 1479 "seclang-parser.yy" +#line 1481 "seclang-parser.yy" { std::string error; double ruleId; @@ -2906,7 +2906,7 @@ namespace yy { break; case 124: // expression: "CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID" actions -#line 1505 "seclang-parser.yy" +#line 1507 "seclang-parser.yy" { std::string error; double ruleId; @@ -2937,7 +2937,7 @@ namespace yy { break; case 125: // expression: "CONFIG_DIR_DEBUG_LVL" -#line 1533 "seclang-parser.yy" +#line 1535 "seclang-parser.yy" { if (driver.m_debugLog != NULL) { driver.m_debugLog->setDebugLogLevel(atoi(yystack_[0].value.as < std::string > ().c_str())); @@ -2953,7 +2953,7 @@ namespace yy { break; case 126: // expression: "CONFIG_DIR_DEBUG_LOG" -#line 1545 "seclang-parser.yy" +#line 1547 "seclang-parser.yy" { if (driver.m_debugLog != NULL) { std::string error; @@ -2976,7 +2976,7 @@ namespace yy { break; case 127: // expression: "CONFIG_DIR_GEO_DB" -#line 1565 "seclang-parser.yy" +#line 1567 "seclang-parser.yy" { #if defined(WITH_GEOIP) or defined(WITH_MAXMIND) std::string err; @@ -3007,7 +3007,7 @@ namespace yy { break; case 128: // expression: "CONFIG_DIR_ARGS_LIMIT" -#line 1592 "seclang-parser.yy" +#line 1594 "seclang-parser.yy" { driver.m_argumentsLimit.m_set = true; driver.m_argumentsLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3016,7 +3016,7 @@ namespace yy { break; case 129: // expression: "CONFIG_DIR_REQ_BODY_LIMIT" -#line 1598 "seclang-parser.yy" +#line 1600 "seclang-parser.yy" { driver.m_requestBodyLimit.m_set = true; driver.m_requestBodyLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3025,7 +3025,7 @@ namespace yy { break; case 130: // expression: "CONFIG_DIR_REQ_BODY_NO_FILES_LIMIT" -#line 1603 "seclang-parser.yy" +#line 1605 "seclang-parser.yy" { driver.m_requestBodyNoFilesLimit.m_set = true; driver.m_requestBodyNoFilesLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3034,7 +3034,7 @@ namespace yy { break; case 131: // expression: "CONFIG_DIR_REQ_BODY_IN_MEMORY_LIMIT" -#line 1608 "seclang-parser.yy" +#line 1610 "seclang-parser.yy" { std::stringstream ss; ss << "As of ModSecurity version 3.0, SecRequestBodyInMemoryLimit is no longer "; @@ -3047,7 +3047,7 @@ namespace yy { break; case 132: // expression: "CONFIG_DIR_RES_BODY_LIMIT" -#line 1617 "seclang-parser.yy" +#line 1619 "seclang-parser.yy" { driver.m_responseBodyLimit.m_set = true; driver.m_responseBodyLimit.m_value = atoi(yystack_[0].value.as < std::string > ().c_str()); @@ -3056,7 +3056,7 @@ namespace yy { break; case 133: // expression: "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" "CONFIG_VALUE_PROCESS_PARTIAL" -#line 1622 "seclang-parser.yy" +#line 1624 "seclang-parser.yy" { driver.m_requestBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction; } @@ -3064,7 +3064,7 @@ namespace yy { break; case 134: // expression: "CONFIG_DIR_REQ_BODY_LIMIT_ACTION" "CONFIG_VALUE_REJECT" -#line 1626 "seclang-parser.yy" +#line 1628 "seclang-parser.yy" { driver.m_requestBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::RejectBodyLimitAction; } @@ -3072,7 +3072,7 @@ namespace yy { break; case 135: // expression: "CONFIG_DIR_RES_BODY_LIMIT_ACTION" "CONFIG_VALUE_PROCESS_PARTIAL" -#line 1630 "seclang-parser.yy" +#line 1632 "seclang-parser.yy" { driver.m_responseBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::ProcessPartialBodyLimitAction; } @@ -3080,7 +3080,7 @@ namespace yy { break; case 136: // expression: "CONFIG_DIR_RES_BODY_LIMIT_ACTION" "CONFIG_VALUE_REJECT" -#line 1634 "seclang-parser.yy" +#line 1636 "seclang-parser.yy" { driver.m_responseBodyLimitAction = modsecurity::RulesSet::BodyLimitAction::RejectBodyLimitAction; } @@ -3088,7 +3088,7 @@ namespace yy { break; case 137: // expression: "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" "CONFIG_VALUE_ABORT" -#line 1638 "seclang-parser.yy" +#line 1640 "seclang-parser.yy" { driver.m_remoteRulesActionOnFailed = RulesSet::OnFailedRemoteRulesAction::AbortOnFailedRemoteRulesAction; } @@ -3096,7 +3096,7 @@ namespace yy { break; case 138: // expression: "CONFIG_SEC_REMOTE_RULES_FAIL_ACTION" "CONFIG_VALUE_WARN" -#line 1642 "seclang-parser.yy" +#line 1644 "seclang-parser.yy" { driver.m_remoteRulesActionOnFailed = RulesSet::OnFailedRemoteRulesAction::WarnOnFailedRemoteRulesAction; } @@ -3104,7 +3104,7 @@ namespace yy { break; case 141: // expression: "CONGIG_DIR_RESPONSE_BODY_MP" -#line 1656 "seclang-parser.yy" +#line 1658 "seclang-parser.yy" { std::istringstream buf(yystack_[0].value.as < std::string > ()); std::istream_iterator beg(buf), end; @@ -3120,7 +3120,7 @@ namespace yy { break; case 142: // expression: "CONGIG_DIR_RESPONSE_BODY_MP_CLEAR" -#line 1668 "seclang-parser.yy" +#line 1670 "seclang-parser.yy" { driver.m_responseBodyTypeToBeInspected.m_set = true; driver.m_responseBodyTypeToBeInspected.m_clear = true; @@ -3130,7 +3130,7 @@ namespace yy { break; case 143: // expression: "CONFIG_XML_EXTERNAL_ENTITY" "CONFIG_VALUE_OFF" -#line 1674 "seclang-parser.yy" +#line 1676 "seclang-parser.yy" { driver.m_secXMLExternalEntity = modsecurity::RulesSetProperties::FalseConfigBoolean; } @@ -3138,7 +3138,7 @@ namespace yy { break; case 144: // expression: "CONFIG_XML_EXTERNAL_ENTITY" "CONFIG_VALUE_ON" -#line 1678 "seclang-parser.yy" +#line 1680 "seclang-parser.yy" { driver.m_secXMLExternalEntity = modsecurity::RulesSetProperties::TrueConfigBoolean; } @@ -3146,7 +3146,7 @@ namespace yy { break; case 145: // expression: "CONGIG_DIR_SEC_TMP_DIR" -#line 1682 "seclang-parser.yy" +#line 1684 "seclang-parser.yy" { /* Parser error disabled to avoid breaking default installations with modsecurity.conf-recommended std::stringstream ss; @@ -3161,7 +3161,7 @@ namespace yy { break; case 148: // expression: "CONGIG_DIR_SEC_COOKIE_FORMAT" -#line 1703 "seclang-parser.yy" +#line 1705 "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."); @@ -3172,7 +3172,7 @@ namespace yy { break; case 149: // expression: "CONFIG_SEC_COOKIEV0_SEPARATOR" -#line 1710 "seclang-parser.yy" +#line 1712 "seclang-parser.yy" { driver.error(yystack_[1].location, "SecCookieV0Separator is not yet supported."); YYERROR; @@ -3181,7 +3181,7 @@ namespace yy { break; case 151: // expression: "CONFIG_DIR_UNICODE_MAP_FILE" -#line 1720 "seclang-parser.yy" +#line 1722 "seclang-parser.yy" { std::string error; std::vector param; @@ -3239,7 +3239,7 @@ namespace yy { break; case 152: // expression: "CONFIG_SEC_COLLECTION_TIMEOUT" -#line 1774 "seclang-parser.yy" +#line 1776 "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."); @@ -3250,7 +3250,7 @@ namespace yy { break; case 153: // expression: "CONFIG_SEC_HTTP_BLKEY" -#line 1781 "seclang-parser.yy" +#line 1783 "seclang-parser.yy" { driver.m_httpblKey.m_set = true; driver.m_httpblKey.m_value = yystack_[0].value.as < std::string > (); @@ -3259,7 +3259,7 @@ namespace yy { break; case 154: // variables: variables_pre_process -#line 1789 "seclang-parser.yy" +#line 1791 "seclang-parser.yy" { std::unique_ptr > > originalList = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); std::unique_ptr>> newList(new std::vector>()); @@ -3297,7 +3297,7 @@ namespace yy { break; case 155: // variables_pre_process: variables_may_be_quoted -#line 1826 "seclang-parser.yy" +#line 1828 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[0].value.as < std::unique_ptr > > > ()); } @@ -3305,7 +3305,7 @@ namespace yy { break; case 156: // variables_pre_process: "QUOTATION_MARK" variables_may_be_quoted "QUOTATION_MARK" -#line 1830 "seclang-parser.yy" +#line 1832 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > > > () = std::move(yystack_[1].value.as < std::unique_ptr > > > ()); } @@ -3313,7 +3313,7 @@ namespace yy { break; case 157: // variables_may_be_quoted: variables_may_be_quoted PIPE var -#line 1837 "seclang-parser.yy" +#line 1839 "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 > > > ()); @@ -3322,7 +3322,7 @@ namespace yy { break; case 158: // variables_may_be_quoted: variables_may_be_quoted PIPE VAR_EXCLUSION var -#line 1842 "seclang-parser.yy" +#line 1844 "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)); @@ -3332,7 +3332,7 @@ namespace yy { break; case 159: // variables_may_be_quoted: variables_may_be_quoted PIPE VAR_COUNT var -#line 1848 "seclang-parser.yy" +#line 1850 "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)); @@ -3342,7 +3342,7 @@ namespace yy { break; case 160: // variables_may_be_quoted: var -#line 1854 "seclang-parser.yy" +#line 1856 "seclang-parser.yy" { std::unique_ptr>> b(new std::vector>()); b->push_back(std::move(yystack_[0].value.as < std::unique_ptr > ())); @@ -3352,7 +3352,7 @@ namespace yy { break; case 161: // variables_may_be_quoted: VAR_EXCLUSION var -#line 1860 "seclang-parser.yy" +#line 1862 "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 > ()))); @@ -3363,7 +3363,7 @@ namespace yy { break; case 162: // variables_may_be_quoted: VAR_COUNT var -#line 1867 "seclang-parser.yy" +#line 1869 "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 > ()))); @@ -3374,7 +3374,7 @@ namespace yy { break; case 163: // var: VARIABLE_ARGS "Dictionary element" -#line 1877 "seclang-parser.yy" +#line 1879 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3382,7 +3382,7 @@ namespace yy { break; case 164: // var: VARIABLE_ARGS "Dictionary element, selected by regexp" -#line 1881 "seclang-parser.yy" +#line 1883 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3390,7 +3390,7 @@ namespace yy { break; case 165: // var: VARIABLE_ARGS -#line 1885 "seclang-parser.yy" +#line 1887 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Args_NoDictElement()); } @@ -3398,7 +3398,7 @@ namespace yy { break; case 166: // var: VARIABLE_ARGS_POST "Dictionary element" -#line 1889 "seclang-parser.yy" +#line 1891 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3406,7 +3406,7 @@ namespace yy { break; case 167: // var: VARIABLE_ARGS_POST "Dictionary element, selected by regexp" -#line 1893 "seclang-parser.yy" +#line 1895 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3414,7 +3414,7 @@ namespace yy { break; case 168: // var: VARIABLE_ARGS_POST -#line 1897 "seclang-parser.yy" +#line 1899 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPost_NoDictElement()); } @@ -3422,7 +3422,7 @@ namespace yy { break; case 169: // var: VARIABLE_ARGS_GET "Dictionary element" -#line 1901 "seclang-parser.yy" +#line 1903 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3430,7 +3430,7 @@ namespace yy { break; case 170: // var: VARIABLE_ARGS_GET "Dictionary element, selected by regexp" -#line 1905 "seclang-parser.yy" +#line 1907 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3438,7 +3438,7 @@ namespace yy { break; case 171: // var: VARIABLE_ARGS_GET -#line 1909 "seclang-parser.yy" +#line 1911 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGet_NoDictElement()); } @@ -3446,7 +3446,7 @@ namespace yy { break; case 172: // var: VARIABLE_FILES_SIZES "Dictionary element" -#line 1913 "seclang-parser.yy" +#line 1915 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3454,7 +3454,7 @@ namespace yy { break; case 173: // var: VARIABLE_FILES_SIZES "Dictionary element, selected by regexp" -#line 1917 "seclang-parser.yy" +#line 1919 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3462,7 +3462,7 @@ namespace yy { break; case 174: // var: VARIABLE_FILES_SIZES -#line 1921 "seclang-parser.yy" +#line 1923 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesSizes_NoDictElement()); } @@ -3470,7 +3470,7 @@ namespace yy { break; case 175: // var: VARIABLE_FILES_NAMES "Dictionary element" -#line 1925 "seclang-parser.yy" +#line 1927 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3478,7 +3478,7 @@ namespace yy { break; case 176: // var: VARIABLE_FILES_NAMES "Dictionary element, selected by regexp" -#line 1929 "seclang-parser.yy" +#line 1931 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3486,7 +3486,7 @@ namespace yy { break; case 177: // var: VARIABLE_FILES_NAMES -#line 1933 "seclang-parser.yy" +#line 1935 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesNames_NoDictElement()); } @@ -3494,7 +3494,7 @@ namespace yy { break; case 178: // var: VARIABLE_FILES_TMP_CONTENT "Dictionary element" -#line 1937 "seclang-parser.yy" +#line 1939 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3502,7 +3502,7 @@ namespace yy { break; case 179: // var: VARIABLE_FILES_TMP_CONTENT "Dictionary element, selected by regexp" -#line 1941 "seclang-parser.yy" +#line 1943 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3510,7 +3510,7 @@ namespace yy { break; case 180: // var: VARIABLE_FILES_TMP_CONTENT -#line 1945 "seclang-parser.yy" +#line 1947 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpContent_NoDictElement()); } @@ -3518,7 +3518,7 @@ namespace yy { break; case 181: // var: VARIABLE_MULTIPART_FILENAME "Dictionary element" -#line 1949 "seclang-parser.yy" +#line 1951 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3526,7 +3526,7 @@ namespace yy { break; case 182: // var: VARIABLE_MULTIPART_FILENAME "Dictionary element, selected by regexp" -#line 1953 "seclang-parser.yy" +#line 1955 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3534,7 +3534,7 @@ namespace yy { break; case 183: // var: VARIABLE_MULTIPART_FILENAME -#line 1957 "seclang-parser.yy" +#line 1959 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartFileName_NoDictElement()); } @@ -3542,7 +3542,7 @@ namespace yy { break; case 184: // var: VARIABLE_MULTIPART_NAME "Dictionary element" -#line 1961 "seclang-parser.yy" +#line 1963 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3550,7 +3550,7 @@ namespace yy { break; case 185: // var: VARIABLE_MULTIPART_NAME "Dictionary element, selected by regexp" -#line 1965 "seclang-parser.yy" +#line 1967 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3558,7 +3558,7 @@ namespace yy { break; case 186: // var: VARIABLE_MULTIPART_NAME -#line 1969 "seclang-parser.yy" +#line 1971 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultiPartName_NoDictElement()); } @@ -3566,7 +3566,7 @@ namespace yy { break; case 187: // var: VARIABLE_MATCHED_VARS_NAMES "Dictionary element" -#line 1973 "seclang-parser.yy" +#line 1975 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3574,7 +3574,7 @@ namespace yy { break; case 188: // var: VARIABLE_MATCHED_VARS_NAMES "Dictionary element, selected by regexp" -#line 1977 "seclang-parser.yy" +#line 1979 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3582,7 +3582,7 @@ namespace yy { break; case 189: // var: VARIABLE_MATCHED_VARS_NAMES -#line 1981 "seclang-parser.yy" +#line 1983 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarsNames_NoDictElement()); } @@ -3590,7 +3590,7 @@ namespace yy { break; case 190: // var: VARIABLE_MATCHED_VARS "Dictionary element" -#line 1985 "seclang-parser.yy" +#line 1987 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3598,7 +3598,7 @@ namespace yy { break; case 191: // var: VARIABLE_MATCHED_VARS "Dictionary element, selected by regexp" -#line 1989 "seclang-parser.yy" +#line 1991 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3606,7 +3606,7 @@ namespace yy { break; case 192: // var: VARIABLE_MATCHED_VARS -#line 1993 "seclang-parser.yy" +#line 1995 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVars_NoDictElement()); } @@ -3614,7 +3614,7 @@ namespace yy { break; case 193: // var: VARIABLE_FILES "Dictionary element" -#line 1997 "seclang-parser.yy" +#line 1999 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3622,7 +3622,7 @@ namespace yy { break; case 194: // var: VARIABLE_FILES "Dictionary element, selected by regexp" -#line 2001 "seclang-parser.yy" +#line 2003 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3630,7 +3630,7 @@ namespace yy { break; case 195: // var: VARIABLE_FILES -#line 2005 "seclang-parser.yy" +#line 2007 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Files_NoDictElement()); } @@ -3638,7 +3638,7 @@ namespace yy { break; case 196: // var: VARIABLE_REQUEST_COOKIES "Dictionary element" -#line 2009 "seclang-parser.yy" +#line 2011 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3646,7 +3646,7 @@ namespace yy { break; case 197: // var: VARIABLE_REQUEST_COOKIES "Dictionary element, selected by regexp" -#line 2013 "seclang-parser.yy" +#line 2015 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3654,7 +3654,7 @@ namespace yy { break; case 198: // var: VARIABLE_REQUEST_COOKIES -#line 2017 "seclang-parser.yy" +#line 2019 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookies_NoDictElement()); } @@ -3662,7 +3662,7 @@ namespace yy { break; case 199: // var: VARIABLE_REQUEST_HEADERS "Dictionary element" -#line 2021 "seclang-parser.yy" +#line 2023 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3670,7 +3670,7 @@ namespace yy { break; case 200: // var: VARIABLE_REQUEST_HEADERS "Dictionary element, selected by regexp" -#line 2025 "seclang-parser.yy" +#line 2027 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3678,7 +3678,7 @@ namespace yy { break; case 201: // var: VARIABLE_REQUEST_HEADERS -#line 2029 "seclang-parser.yy" +#line 2031 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeaders_NoDictElement()); } @@ -3686,7 +3686,7 @@ namespace yy { break; case 202: // var: VARIABLE_RESPONSE_HEADERS "Dictionary element" -#line 2033 "seclang-parser.yy" +#line 2035 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3694,7 +3694,7 @@ namespace yy { break; case 203: // var: VARIABLE_RESPONSE_HEADERS "Dictionary element, selected by regexp" -#line 2037 "seclang-parser.yy" +#line 2039 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3702,7 +3702,7 @@ namespace yy { break; case 204: // var: VARIABLE_RESPONSE_HEADERS -#line 2041 "seclang-parser.yy" +#line 2043 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeaders_NoDictElement()); } @@ -3710,7 +3710,7 @@ namespace yy { break; case 205: // var: VARIABLE_GEO "Dictionary element" -#line 2045 "seclang-parser.yy" +#line 2047 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3718,7 +3718,7 @@ namespace yy { break; case 206: // var: VARIABLE_GEO "Dictionary element, selected by regexp" -#line 2049 "seclang-parser.yy" +#line 2051 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3726,7 +3726,7 @@ namespace yy { break; case 207: // var: VARIABLE_GEO -#line 2053 "seclang-parser.yy" +#line 2055 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Geo_NoDictElement()); } @@ -3734,7 +3734,7 @@ namespace yy { break; case 208: // var: VARIABLE_REQUEST_COOKIES_NAMES "Dictionary element" -#line 2057 "seclang-parser.yy" +#line 2059 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3742,7 +3742,7 @@ namespace yy { break; case 209: // var: VARIABLE_REQUEST_COOKIES_NAMES "Dictionary element, selected by regexp" -#line 2061 "seclang-parser.yy" +#line 2063 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3750,7 +3750,7 @@ namespace yy { break; case 210: // var: VARIABLE_REQUEST_COOKIES_NAMES -#line 2065 "seclang-parser.yy" +#line 2067 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestCookiesNames_NoDictElement()); } @@ -3758,7 +3758,7 @@ namespace yy { break; case 211: // var: VARIABLE_RULE "Dictionary element" -#line 2069 "seclang-parser.yy" +#line 2071 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3766,7 +3766,7 @@ namespace yy { break; case 212: // var: VARIABLE_RULE "Dictionary element, selected by regexp" -#line 2073 "seclang-parser.yy" +#line 2075 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3774,7 +3774,7 @@ namespace yy { break; case 213: // var: VARIABLE_RULE -#line 2077 "seclang-parser.yy" +#line 2079 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Rule_NoDictElement()); } @@ -3782,7 +3782,7 @@ namespace yy { break; case 214: // var: "RUN_TIME_VAR_ENV" "Dictionary element" -#line 2081 "seclang-parser.yy" +#line 2083 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV:" + yystack_[0].value.as < std::string > ())); } @@ -3790,7 +3790,7 @@ namespace yy { break; case 215: // var: "RUN_TIME_VAR_ENV" "Dictionary element, selected by regexp" -#line 2085 "seclang-parser.yy" +#line 2087 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV:" + yystack_[0].value.as < std::string > ())); } @@ -3798,7 +3798,7 @@ namespace yy { break; case 216: // var: "RUN_TIME_VAR_ENV" -#line 2089 "seclang-parser.yy" +#line 2091 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Env("ENV")); } @@ -3806,7 +3806,7 @@ namespace yy { break; case 217: // var: "RUN_TIME_VAR_XML" "Dictionary element" -#line 2093 "seclang-parser.yy" +#line 2095 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML("XML:" + yystack_[0].value.as < std::string > ())); } @@ -3814,7 +3814,7 @@ namespace yy { break; case 218: // var: "RUN_TIME_VAR_XML" "Dictionary element, selected by regexp" -#line 2097 "seclang-parser.yy" +#line 2099 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML("XML:" + yystack_[0].value.as < std::string > ())); } @@ -3822,7 +3822,7 @@ namespace yy { break; case 219: // var: "RUN_TIME_VAR_XML" -#line 2101 "seclang-parser.yy" +#line 2103 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::XML_NoDictElement()); } @@ -3830,7 +3830,7 @@ namespace yy { break; case 220: // var: "FILES_TMPNAMES" "Dictionary element" -#line 2105 "seclang-parser.yy" +#line 2107 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3838,7 +3838,7 @@ namespace yy { break; case 221: // var: "FILES_TMPNAMES" "Dictionary element, selected by regexp" -#line 2109 "seclang-parser.yy" +#line 2111 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3846,7 +3846,7 @@ namespace yy { break; case 222: // var: "FILES_TMPNAMES" -#line 2113 "seclang-parser.yy" +#line 2115 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesTmpNames_NoDictElement()); } @@ -3854,7 +3854,7 @@ namespace yy { break; case 223: // var: "RESOURCE" run_time_string -#line 2117 "seclang-parser.yy" +#line 2119 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3862,7 +3862,7 @@ namespace yy { break; case 224: // var: "RESOURCE" "Dictionary element" -#line 2121 "seclang-parser.yy" +#line 2123 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3870,7 +3870,7 @@ namespace yy { break; case 225: // var: "RESOURCE" "Dictionary element, selected by regexp" -#line 2125 "seclang-parser.yy" +#line 2127 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3878,7 +3878,7 @@ namespace yy { break; case 226: // var: "RESOURCE" -#line 2129 "seclang-parser.yy" +#line 2131 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Resource_NoDictElement()); } @@ -3886,7 +3886,7 @@ namespace yy { break; case 227: // var: "VARIABLE_IP" run_time_string -#line 2133 "seclang-parser.yy" +#line 2135 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3894,7 +3894,7 @@ namespace yy { break; case 228: // var: "VARIABLE_IP" "Dictionary element" -#line 2137 "seclang-parser.yy" +#line 2139 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3902,7 +3902,7 @@ namespace yy { break; case 229: // var: "VARIABLE_IP" "Dictionary element, selected by regexp" -#line 2141 "seclang-parser.yy" +#line 2143 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3910,7 +3910,7 @@ namespace yy { break; case 230: // var: "VARIABLE_IP" -#line 2145 "seclang-parser.yy" +#line 2147 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Ip_NoDictElement()); } @@ -3918,7 +3918,7 @@ namespace yy { break; case 231: // var: "VARIABLE_GLOBAL" run_time_string -#line 2149 "seclang-parser.yy" +#line 2151 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3926,7 +3926,7 @@ namespace yy { break; case 232: // var: "VARIABLE_GLOBAL" "Dictionary element" -#line 2153 "seclang-parser.yy" +#line 2155 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3934,7 +3934,7 @@ namespace yy { break; case 233: // var: "VARIABLE_GLOBAL" "Dictionary element, selected by regexp" -#line 2157 "seclang-parser.yy" +#line 2159 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3942,7 +3942,7 @@ namespace yy { break; case 234: // var: "VARIABLE_GLOBAL" -#line 2161 "seclang-parser.yy" +#line 2163 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Global_NoDictElement()); } @@ -3950,7 +3950,7 @@ namespace yy { break; case 235: // var: "VARIABLE_USER" run_time_string -#line 2165 "seclang-parser.yy" +#line 2167 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3958,7 +3958,7 @@ namespace yy { break; case 236: // var: "VARIABLE_USER" "Dictionary element" -#line 2169 "seclang-parser.yy" +#line 2171 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3966,7 +3966,7 @@ namespace yy { break; case 237: // var: "VARIABLE_USER" "Dictionary element, selected by regexp" -#line 2173 "seclang-parser.yy" +#line 2175 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -3974,7 +3974,7 @@ namespace yy { break; case 238: // var: "VARIABLE_USER" -#line 2177 "seclang-parser.yy" +#line 2179 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::User_NoDictElement()); } @@ -3982,7 +3982,7 @@ namespace yy { break; case 239: // var: "VARIABLE_TX" run_time_string -#line 2181 "seclang-parser.yy" +#line 2183 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -3990,7 +3990,7 @@ namespace yy { break; case 240: // var: "VARIABLE_TX" "Dictionary element" -#line 2185 "seclang-parser.yy" +#line 2187 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DictElement(yystack_[0].value.as < std::string > ())); } @@ -3998,7 +3998,7 @@ namespace yy { break; case 241: // var: "VARIABLE_TX" "Dictionary element, selected by regexp" -#line 2189 "seclang-parser.yy" +#line 2191 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4006,7 +4006,7 @@ namespace yy { break; case 242: // var: "VARIABLE_TX" -#line 2193 "seclang-parser.yy" +#line 2195 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Tx_NoDictElement()); } @@ -4014,7 +4014,7 @@ namespace yy { break; case 243: // var: "VARIABLE_SESSION" run_time_string -#line 2197 "seclang-parser.yy" +#line 2199 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DynamicElement(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -4022,7 +4022,7 @@ namespace yy { break; case 244: // var: "VARIABLE_SESSION" "Dictionary element" -#line 2201 "seclang-parser.yy" +#line 2203 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4030,7 +4030,7 @@ namespace yy { break; case 245: // var: "VARIABLE_SESSION" "Dictionary element, selected by regexp" -#line 2205 "seclang-parser.yy" +#line 2207 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4038,7 +4038,7 @@ namespace yy { break; case 246: // var: "VARIABLE_SESSION" -#line 2209 "seclang-parser.yy" +#line 2211 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Session_NoDictElement()); } @@ -4046,7 +4046,7 @@ namespace yy { break; case 247: // var: "Variable ARGS_NAMES" "Dictionary element" -#line 2213 "seclang-parser.yy" +#line 2215 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4054,7 +4054,7 @@ namespace yy { break; case 248: // var: "Variable ARGS_NAMES" "Dictionary element, selected by regexp" -#line 2217 "seclang-parser.yy" +#line 2219 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4062,7 +4062,7 @@ namespace yy { break; case 249: // var: "Variable ARGS_NAMES" -#line 2221 "seclang-parser.yy" +#line 2223 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsNames_NoDictElement()); } @@ -4070,7 +4070,7 @@ namespace yy { break; case 250: // var: VARIABLE_ARGS_GET_NAMES "Dictionary element" -#line 2225 "seclang-parser.yy" +#line 2227 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4078,7 +4078,7 @@ namespace yy { break; case 251: // var: VARIABLE_ARGS_GET_NAMES "Dictionary element, selected by regexp" -#line 2229 "seclang-parser.yy" +#line 2231 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4086,7 +4086,7 @@ namespace yy { break; case 252: // var: VARIABLE_ARGS_GET_NAMES -#line 2233 "seclang-parser.yy" +#line 2235 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsGetNames_NoDictElement()); } @@ -4094,7 +4094,7 @@ namespace yy { break; case 253: // var: VARIABLE_ARGS_POST_NAMES "Dictionary element" -#line 2238 "seclang-parser.yy" +#line 2240 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4102,7 +4102,7 @@ namespace yy { break; case 254: // var: VARIABLE_ARGS_POST_NAMES "Dictionary element, selected by regexp" -#line 2242 "seclang-parser.yy" +#line 2244 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4110,7 +4110,7 @@ namespace yy { break; case 255: // var: VARIABLE_ARGS_POST_NAMES -#line 2246 "seclang-parser.yy" +#line 2248 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsPostNames_NoDictElement()); } @@ -4118,7 +4118,7 @@ namespace yy { break; case 256: // var: VARIABLE_REQUEST_HEADERS_NAMES "Dictionary element" -#line 2251 "seclang-parser.yy" +#line 2253 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4126,7 +4126,7 @@ namespace yy { break; case 257: // var: VARIABLE_REQUEST_HEADERS_NAMES "Dictionary element, selected by regexp" -#line 2255 "seclang-parser.yy" +#line 2257 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4134,7 +4134,7 @@ namespace yy { break; case 258: // var: VARIABLE_REQUEST_HEADERS_NAMES -#line 2259 "seclang-parser.yy" +#line 2261 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestHeadersNames_NoDictElement()); } @@ -4142,7 +4142,7 @@ namespace yy { break; case 259: // var: VARIABLE_RESPONSE_CONTENT_TYPE -#line 2264 "seclang-parser.yy" +#line 2266 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseContentType()); } @@ -4150,7 +4150,7 @@ namespace yy { break; case 260: // var: VARIABLE_RESPONSE_HEADERS_NAMES "Dictionary element" -#line 2269 "seclang-parser.yy" +#line 2271 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_DictElement(yystack_[0].value.as < std::string > ())); } @@ -4158,7 +4158,7 @@ namespace yy { break; case 261: // var: VARIABLE_RESPONSE_HEADERS_NAMES "Dictionary element, selected by regexp" -#line 2273 "seclang-parser.yy" +#line 2275 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_DictElementRegexp(yystack_[0].value.as < std::string > ())); } @@ -4166,7 +4166,7 @@ namespace yy { break; case 262: // var: VARIABLE_RESPONSE_HEADERS_NAMES -#line 2277 "seclang-parser.yy" +#line 2279 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseHeadersNames_NoDictElement()); } @@ -4174,7 +4174,7 @@ namespace yy { break; case 263: // var: VARIABLE_ARGS_COMBINED_SIZE -#line 2281 "seclang-parser.yy" +#line 2283 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ArgsCombinedSize()); } @@ -4182,7 +4182,7 @@ namespace yy { break; case 264: // var: "AUTH_TYPE" -#line 2285 "seclang-parser.yy" +#line 2287 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::AuthType()); } @@ -4190,7 +4190,7 @@ namespace yy { break; case 265: // var: "FILES_COMBINED_SIZE" -#line 2289 "seclang-parser.yy" +#line 2291 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FilesCombinedSize()); } @@ -4198,7 +4198,7 @@ namespace yy { break; case 266: // var: "FULL_REQUEST" -#line 2293 "seclang-parser.yy" +#line 2295 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FullRequest()); } @@ -4206,7 +4206,7 @@ namespace yy { break; case 267: // var: "FULL_REQUEST_LENGTH" -#line 2297 "seclang-parser.yy" +#line 2299 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::FullRequestLength()); } @@ -4214,7 +4214,7 @@ namespace yy { break; case 268: // var: "INBOUND_DATA_ERROR" -#line 2301 "seclang-parser.yy" +#line 2303 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::InboundDataError()); } @@ -4222,7 +4222,7 @@ namespace yy { break; case 269: // var: "MATCHED_VAR" -#line 2305 "seclang-parser.yy" +#line 2307 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVar()); } @@ -4230,7 +4230,7 @@ namespace yy { break; case 270: // var: "MATCHED_VAR_NAME" -#line 2309 "seclang-parser.yy" +#line 2311 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MatchedVarName()); } @@ -4238,7 +4238,7 @@ namespace yy { break; case 271: // var: VARIABLE_MULTIPART_BOUNDARY_QUOTED -#line 2313 "seclang-parser.yy" +#line 2315 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartBoundaryQuoted()); } @@ -4246,7 +4246,7 @@ namespace yy { break; case 272: // var: VARIABLE_MULTIPART_BOUNDARY_WHITESPACE -#line 2317 "seclang-parser.yy" +#line 2319 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartBoundaryWhiteSpace()); } @@ -4254,7 +4254,7 @@ namespace yy { break; case 273: // var: "MULTIPART_CRLF_LF_LINES" -#line 2321 "seclang-parser.yy" +#line 2323 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartCrlfLFLines()); } @@ -4262,7 +4262,7 @@ namespace yy { break; case 274: // var: "MULTIPART_DATA_AFTER" -#line 2325 "seclang-parser.yy" +#line 2327 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartDateAfter()); } @@ -4270,7 +4270,7 @@ namespace yy { break; case 275: // var: VARIABLE_MULTIPART_DATA_BEFORE -#line 2329 "seclang-parser.yy" +#line 2331 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartDateBefore()); } @@ -4278,7 +4278,7 @@ namespace yy { break; case 276: // var: "MULTIPART_FILE_LIMIT_EXCEEDED" -#line 2333 "seclang-parser.yy" +#line 2335 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartFileLimitExceeded()); } @@ -4286,7 +4286,7 @@ namespace yy { break; case 277: // var: "MULTIPART_HEADER_FOLDING" -#line 2337 "seclang-parser.yy" +#line 2339 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartHeaderFolding()); } @@ -4294,7 +4294,7 @@ namespace yy { break; case 278: // var: "MULTIPART_INVALID_HEADER_FOLDING" -#line 2341 "seclang-parser.yy" +#line 2343 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidHeaderFolding()); } @@ -4302,7 +4302,7 @@ namespace yy { break; case 279: // var: VARIABLE_MULTIPART_INVALID_PART -#line 2345 "seclang-parser.yy" +#line 2347 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidPart()); } @@ -4310,7 +4310,7 @@ namespace yy { break; case 280: // var: "MULTIPART_INVALID_QUOTING" -#line 2349 "seclang-parser.yy" +#line 2351 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartInvalidQuoting()); } @@ -4318,7 +4318,7 @@ namespace yy { break; case 281: // var: VARIABLE_MULTIPART_LF_LINE -#line 2353 "seclang-parser.yy" +#line 2355 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartLFLine()); } @@ -4326,7 +4326,7 @@ namespace yy { break; case 282: // var: VARIABLE_MULTIPART_MISSING_SEMICOLON -#line 2357 "seclang-parser.yy" +#line 2359 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartMissingSemicolon()); } @@ -4334,7 +4334,7 @@ namespace yy { break; case 283: // var: VARIABLE_MULTIPART_SEMICOLON_MISSING -#line 2361 "seclang-parser.yy" +#line 2363 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartMissingSemicolon()); } @@ -4342,7 +4342,7 @@ namespace yy { break; case 284: // var: "MULTIPART_STRICT_ERROR" -#line 2365 "seclang-parser.yy" +#line 2367 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartStrictError()); } @@ -4350,7 +4350,7 @@ namespace yy { break; case 285: // var: "MULTIPART_UNMATCHED_BOUNDARY" -#line 2369 "seclang-parser.yy" +#line 2371 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::MultipartUnmatchedBoundary()); } @@ -4358,7 +4358,7 @@ namespace yy { break; case 286: // var: "OUTBOUND_DATA_ERROR" -#line 2373 "seclang-parser.yy" +#line 2375 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::OutboundDataError()); } @@ -4366,7 +4366,7 @@ namespace yy { break; case 287: // var: "PATH_INFO" -#line 2377 "seclang-parser.yy" +#line 2379 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::PathInfo()); } @@ -4374,7 +4374,7 @@ namespace yy { break; case 288: // var: "QUERY_STRING" -#line 2381 "seclang-parser.yy" +#line 2383 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::QueryString()); } @@ -4382,7 +4382,7 @@ namespace yy { break; case 289: // var: "REMOTE_ADDR" -#line 2385 "seclang-parser.yy" +#line 2387 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemoteAddr()); } @@ -4390,7 +4390,7 @@ namespace yy { break; case 290: // var: "REMOTE_HOST" -#line 2389 "seclang-parser.yy" +#line 2391 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemoteHost()); } @@ -4398,7 +4398,7 @@ namespace yy { break; case 291: // var: "REMOTE_PORT" -#line 2393 "seclang-parser.yy" +#line 2395 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RemotePort()); } @@ -4406,7 +4406,7 @@ namespace yy { break; case 292: // var: "REQBODY_ERROR" -#line 2397 "seclang-parser.yy" +#line 2399 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyError()); } @@ -4414,7 +4414,7 @@ namespace yy { break; case 293: // var: "REQBODY_ERROR_MSG" -#line 2401 "seclang-parser.yy" +#line 2403 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyErrorMsg()); } @@ -4422,7 +4422,7 @@ namespace yy { break; case 294: // var: "REQBODY_PROCESSOR" -#line 2405 "seclang-parser.yy" +#line 2407 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessor()); } @@ -4430,7 +4430,7 @@ namespace yy { break; case 295: // var: "REQBODY_PROCESSOR_ERROR" -#line 2409 "seclang-parser.yy" +#line 2411 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessorError()); } @@ -4438,7 +4438,7 @@ namespace yy { break; case 296: // var: "REQBODY_PROCESSOR_ERROR_MSG" -#line 2413 "seclang-parser.yy" +#line 2415 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ReqbodyProcessorErrorMsg()); } @@ -4446,7 +4446,7 @@ namespace yy { break; case 297: // var: "REQUEST_BASENAME" -#line 2417 "seclang-parser.yy" +#line 2419 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBasename()); } @@ -4454,7 +4454,7 @@ namespace yy { break; case 298: // var: "REQUEST_BODY" -#line 2421 "seclang-parser.yy" +#line 2423 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBody()); } @@ -4462,7 +4462,7 @@ namespace yy { break; case 299: // var: "REQUEST_BODY_LENGTH" -#line 2425 "seclang-parser.yy" +#line 2427 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestBodyLength()); } @@ -4470,7 +4470,7 @@ namespace yy { break; case 300: // var: "REQUEST_FILENAME" -#line 2429 "seclang-parser.yy" +#line 2431 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestFilename()); } @@ -4478,7 +4478,7 @@ namespace yy { break; case 301: // var: "REQUEST_LINE" -#line 2433 "seclang-parser.yy" +#line 2435 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestLine()); } @@ -4486,7 +4486,7 @@ namespace yy { break; case 302: // var: "REQUEST_METHOD" -#line 2437 "seclang-parser.yy" +#line 2439 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestMethod()); } @@ -4494,7 +4494,7 @@ namespace yy { break; case 303: // var: "REQUEST_PROTOCOL" -#line 2441 "seclang-parser.yy" +#line 2443 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestProtocol()); } @@ -4502,7 +4502,7 @@ namespace yy { break; case 304: // var: "REQUEST_URI" -#line 2445 "seclang-parser.yy" +#line 2447 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestURI()); } @@ -4510,7 +4510,7 @@ namespace yy { break; case 305: // var: "REQUEST_URI_RAW" -#line 2449 "seclang-parser.yy" +#line 2451 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::RequestURIRaw()); } @@ -4518,7 +4518,7 @@ namespace yy { break; case 306: // var: "RESPONSE_BODY" -#line 2453 "seclang-parser.yy" +#line 2455 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseBody()); } @@ -4526,7 +4526,7 @@ namespace yy { break; case 307: // var: "RESPONSE_CONTENT_LENGTH" -#line 2457 "seclang-parser.yy" +#line 2459 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseContentLength()); } @@ -4534,7 +4534,7 @@ namespace yy { break; case 308: // var: "RESPONSE_PROTOCOL" -#line 2461 "seclang-parser.yy" +#line 2463 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseProtocol()); } @@ -4542,7 +4542,7 @@ namespace yy { break; case 309: // var: "RESPONSE_STATUS" -#line 2465 "seclang-parser.yy" +#line 2467 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ResponseStatus()); } @@ -4550,7 +4550,7 @@ namespace yy { break; case 310: // var: "SERVER_ADDR" -#line 2469 "seclang-parser.yy" +#line 2471 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerAddr()); } @@ -4558,7 +4558,7 @@ namespace yy { break; case 311: // var: "SERVER_NAME" -#line 2473 "seclang-parser.yy" +#line 2475 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerName()); } @@ -4566,7 +4566,7 @@ namespace yy { break; case 312: // var: "SERVER_PORT" -#line 2477 "seclang-parser.yy" +#line 2479 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::ServerPort()); } @@ -4574,7 +4574,7 @@ namespace yy { break; case 313: // var: "SESSIONID" -#line 2481 "seclang-parser.yy" +#line 2483 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::SessionID()); } @@ -4582,7 +4582,7 @@ namespace yy { break; case 314: // var: "UNIQUE_ID" -#line 2485 "seclang-parser.yy" +#line 2487 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UniqueID()); } @@ -4590,7 +4590,7 @@ namespace yy { break; case 315: // var: "URLENCODED_ERROR" -#line 2489 "seclang-parser.yy" +#line 2491 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UrlEncodedError()); } @@ -4598,7 +4598,7 @@ namespace yy { break; case 316: // var: "USERID" -#line 2493 "seclang-parser.yy" +#line 2495 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::UserID()); } @@ -4606,7 +4606,7 @@ namespace yy { break; case 317: // var: "VARIABLE_STATUS" -#line 2497 "seclang-parser.yy" +#line 2499 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Status()); } @@ -4614,7 +4614,7 @@ namespace yy { break; case 318: // var: "VARIABLE_STATUS_LINE" -#line 2501 "seclang-parser.yy" +#line 2503 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::Status()); } @@ -4622,7 +4622,7 @@ namespace yy { break; case 319: // var: "WEBAPPID" -#line 2505 "seclang-parser.yy" +#line 2507 "seclang-parser.yy" { VARIABLE_CONTAINER(yylhs.value.as < std::unique_ptr > (), new variables::WebAppId()); } @@ -4630,7 +4630,7 @@ namespace yy { break; case 320: // var: "RUN_TIME_VAR_DUR" -#line 2509 "seclang-parser.yy" +#line 2511 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4641,7 +4641,7 @@ namespace yy { break; case 321: // var: "RUN_TIME_VAR_BLD" -#line 2517 "seclang-parser.yy" +#line 2519 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4652,7 +4652,7 @@ namespace yy { break; case 322: // var: "RUN_TIME_VAR_HSV" -#line 2524 "seclang-parser.yy" +#line 2526 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4663,7 +4663,7 @@ namespace yy { break; case 323: // var: "RUN_TIME_VAR_REMOTE_USER" -#line 2531 "seclang-parser.yy" +#line 2533 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4674,7 +4674,7 @@ namespace yy { break; case 324: // var: "RUN_TIME_VAR_TIME" -#line 2538 "seclang-parser.yy" +#line 2540 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4685,7 +4685,7 @@ namespace yy { break; case 325: // var: "RUN_TIME_VAR_TIME_DAY" -#line 2545 "seclang-parser.yy" +#line 2547 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4696,7 +4696,7 @@ namespace yy { break; case 326: // var: "RUN_TIME_VAR_TIME_EPOCH" -#line 2552 "seclang-parser.yy" +#line 2554 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4707,7 +4707,7 @@ namespace yy { break; case 327: // var: "RUN_TIME_VAR_TIME_HOUR" -#line 2559 "seclang-parser.yy" +#line 2561 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4718,7 +4718,7 @@ namespace yy { break; case 328: // var: "RUN_TIME_VAR_TIME_MIN" -#line 2566 "seclang-parser.yy" +#line 2568 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4729,7 +4729,7 @@ namespace yy { break; case 329: // var: "RUN_TIME_VAR_TIME_MON" -#line 2573 "seclang-parser.yy" +#line 2575 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4740,7 +4740,7 @@ namespace yy { break; case 330: // var: "RUN_TIME_VAR_TIME_SEC" -#line 2580 "seclang-parser.yy" +#line 2582 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4751,7 +4751,7 @@ namespace yy { break; case 331: // var: "RUN_TIME_VAR_TIME_WDAY" -#line 2587 "seclang-parser.yy" +#line 2589 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4762,7 +4762,7 @@ namespace yy { break; case 332: // var: "RUN_TIME_VAR_TIME_YEAR" -#line 2594 "seclang-parser.yy" +#line 2596 "seclang-parser.yy" { std::string name(yystack_[0].value.as < std::string > ()); char z = name.at(0); @@ -4773,7 +4773,7 @@ namespace yy { break; case 333: // act: "Accuracy" -#line 2604 "seclang-parser.yy" +#line 2606 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Accuracy(yystack_[0].value.as < std::string > ())); } @@ -4781,7 +4781,7 @@ namespace yy { break; case 334: // act: "Allow" -#line 2608 "seclang-parser.yy" +#line 2610 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Allow(yystack_[0].value.as < std::string > ())); } @@ -4789,7 +4789,7 @@ namespace yy { break; case 335: // act: "Append" -#line 2612 "seclang-parser.yy" +#line 2614 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Append", yystack_[1].location); } @@ -4797,7 +4797,7 @@ namespace yy { break; case 336: // act: "AuditLog" -#line 2616 "seclang-parser.yy" +#line 2618 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::AuditLog(yystack_[0].value.as < std::string > ())); } @@ -4805,7 +4805,7 @@ namespace yy { break; case 337: // act: "Block" -#line 2620 "seclang-parser.yy" +#line 2622 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Block(yystack_[0].value.as < std::string > ())); } @@ -4813,7 +4813,7 @@ namespace yy { break; case 338: // act: "Capture" -#line 2624 "seclang-parser.yy" +#line 2626 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Capture(yystack_[0].value.as < std::string > ())); } @@ -4821,7 +4821,7 @@ namespace yy { break; case 339: // act: "Chain" -#line 2628 "seclang-parser.yy" +#line 2630 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Chain(yystack_[0].value.as < std::string > ())); } @@ -4829,7 +4829,7 @@ namespace yy { break; case 340: // act: "ACTION_CTL_AUDIT_ENGINE" "CONFIG_VALUE_ON" -#line 2632 "seclang-parser.yy" +#line 2634 "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 > ())); @@ -4838,7 +4838,7 @@ namespace yy { break; case 341: // act: "ACTION_CTL_AUDIT_ENGINE" "CONFIG_VALUE_OFF" -#line 2637 "seclang-parser.yy" +#line 2639 "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 > ())); @@ -4847,7 +4847,7 @@ namespace yy { break; case 342: // act: "ACTION_CTL_AUDIT_ENGINE" "CONFIG_VALUE_RELEVANT_ONLY" -#line 2642 "seclang-parser.yy" +#line 2644 "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 > ())); @@ -4856,7 +4856,7 @@ namespace yy { break; case 343: // act: "ACTION_CTL_AUDIT_LOG_PARTS" -#line 2647 "seclang-parser.yy" +#line 2649 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::AuditLogParts(yystack_[0].value.as < std::string > ())); } @@ -4864,7 +4864,7 @@ namespace yy { break; case 344: // act: "ACTION_CTL_BDY_JSON" -#line 2651 "seclang-parser.yy" +#line 2653 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorJSON(yystack_[0].value.as < std::string > ())); } @@ -4872,7 +4872,7 @@ namespace yy { break; case 345: // act: "ACTION_CTL_BDY_XML" -#line 2655 "seclang-parser.yy" +#line 2657 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorXML(yystack_[0].value.as < std::string > ())); } @@ -4880,7 +4880,7 @@ namespace yy { break; case 346: // act: "ACTION_CTL_BDY_URLENCODED" -#line 2659 "seclang-parser.yy" +#line 2661 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyProcessorURLENCODED(yystack_[0].value.as < std::string > ())); } @@ -4888,7 +4888,7 @@ namespace yy { break; case 347: // act: "ACTION_CTL_FORCE_REQ_BODY_VAR" "CONFIG_VALUE_ON" -#line 2663 "seclang-parser.yy" +#line 2665 "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 > ())); @@ -4897,7 +4897,7 @@ namespace yy { break; case 348: // act: "ACTION_CTL_FORCE_REQ_BODY_VAR" "CONFIG_VALUE_OFF" -#line 2668 "seclang-parser.yy" +#line 2670 "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 > ())); @@ -4906,7 +4906,7 @@ namespace yy { break; case 349: // act: "ACTION_CTL_REQUEST_BODY_ACCESS" "CONFIG_VALUE_ON" -#line 2673 "seclang-parser.yy" +#line 2675 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyAccess(yystack_[1].value.as < std::string > () + "true")); } @@ -4914,7 +4914,7 @@ namespace yy { break; case 350: // act: "ACTION_CTL_REQUEST_BODY_ACCESS" "CONFIG_VALUE_OFF" -#line 2677 "seclang-parser.yy" +#line 2679 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RequestBodyAccess(yystack_[1].value.as < std::string > () + "false")); } @@ -4922,7 +4922,7 @@ namespace yy { break; case 351: // act: "ACTION_CTL_RULE_ENGINE" "CONFIG_VALUE_ON" -#line 2681 "seclang-parser.yy" +#line 2683 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=on")); } @@ -4930,7 +4930,7 @@ namespace yy { break; case 352: // act: "ACTION_CTL_RULE_ENGINE" "CONFIG_VALUE_OFF" -#line 2685 "seclang-parser.yy" +#line 2687 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=off")); } @@ -4938,7 +4938,7 @@ namespace yy { break; case 353: // act: "ACTION_CTL_RULE_ENGINE" "CONFIG_VALUE_DETC" -#line 2689 "seclang-parser.yy" +#line 2691 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleEngine("ctl:RuleEngine=detectiononly")); } @@ -4946,7 +4946,7 @@ namespace yy { break; case 354: // act: "ACTION_CTL_RULE_REMOVE_BY_ID" -#line 2693 "seclang-parser.yy" +#line 2695 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveById(yystack_[0].value.as < std::string > ())); } @@ -4954,7 +4954,7 @@ namespace yy { break; case 355: // act: "ACTION_CTL_RULE_REMOVE_BY_TAG" -#line 2697 "seclang-parser.yy" +#line 2699 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveByTag(yystack_[0].value.as < std::string > ())); } @@ -4962,7 +4962,7 @@ namespace yy { break; case 356: // act: "ACTION_CTL_RULE_REMOVE_TARGET_BY_ID" -#line 2701 "seclang-parser.yy" +#line 2703 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveTargetById(yystack_[0].value.as < std::string > ())); } @@ -4970,7 +4970,7 @@ namespace yy { break; case 357: // act: "ACTION_CTL_RULE_REMOVE_TARGET_BY_TAG" -#line 2705 "seclang-parser.yy" +#line 2707 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::ctl::RuleRemoveTargetByTag(yystack_[0].value.as < std::string > ())); } @@ -4978,7 +4978,7 @@ namespace yy { break; case 358: // act: "Deny" -#line 2709 "seclang-parser.yy" +#line 2711 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Deny(yystack_[0].value.as < std::string > ())); } @@ -4986,7 +4986,7 @@ namespace yy { break; case 359: // act: "DeprecateVar" -#line 2713 "seclang-parser.yy" +#line 2715 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("DeprecateVar", yystack_[1].location); } @@ -4994,7 +4994,7 @@ namespace yy { break; case 360: // act: "Drop" -#line 2717 "seclang-parser.yy" +#line 2719 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Drop(yystack_[0].value.as < std::string > ())); } @@ -5002,7 +5002,7 @@ namespace yy { break; case 361: // act: "Exec" -#line 2721 "seclang-parser.yy" +#line 2723 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Exec(yystack_[0].value.as < std::string > ())); } @@ -5010,7 +5010,7 @@ namespace yy { break; case 362: // act: "ExpireVar" -#line 2725 "seclang-parser.yy" +#line 2727 "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 > ())); @@ -5019,7 +5019,7 @@ namespace yy { break; case 363: // act: "Id" -#line 2730 "seclang-parser.yy" +#line 2732 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::RuleId(yystack_[0].value.as < std::string > ())); } @@ -5027,7 +5027,7 @@ namespace yy { break; case 364: // act: "InitCol" run_time_string -#line 2734 "seclang-parser.yy" +#line 2736 "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 > ()))); } @@ -5035,7 +5035,7 @@ namespace yy { break; case 365: // act: "LogData" run_time_string -#line 2738 "seclang-parser.yy" +#line 2740 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::LogData(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5043,7 +5043,7 @@ namespace yy { break; case 366: // act: "Log" -#line 2742 "seclang-parser.yy" +#line 2744 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Log(yystack_[0].value.as < std::string > ())); } @@ -5051,7 +5051,7 @@ namespace yy { break; case 367: // act: "Maturity" -#line 2746 "seclang-parser.yy" +#line 2748 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Maturity(yystack_[0].value.as < std::string > ())); } @@ -5059,7 +5059,7 @@ namespace yy { break; case 368: // act: "Msg" run_time_string -#line 2750 "seclang-parser.yy" +#line 2752 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Msg(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5067,7 +5067,7 @@ namespace yy { break; case 369: // act: "MultiMatch" -#line 2754 "seclang-parser.yy" +#line 2756 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::MultiMatch(yystack_[0].value.as < std::string > ())); } @@ -5075,7 +5075,7 @@ namespace yy { break; case 370: // act: "NoAuditLog" -#line 2758 "seclang-parser.yy" +#line 2760 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::NoAuditLog(yystack_[0].value.as < std::string > ())); } @@ -5083,7 +5083,7 @@ namespace yy { break; case 371: // act: "NoLog" -#line 2762 "seclang-parser.yy" +#line 2764 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::NoLog(yystack_[0].value.as < std::string > ())); } @@ -5091,7 +5091,7 @@ namespace yy { break; case 372: // act: "Pass" -#line 2766 "seclang-parser.yy" +#line 2768 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Pass(yystack_[0].value.as < std::string > ())); } @@ -5099,7 +5099,7 @@ namespace yy { break; case 373: // act: "Pause" -#line 2770 "seclang-parser.yy" +#line 2772 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Pause", yystack_[1].location); } @@ -5107,7 +5107,7 @@ namespace yy { break; case 374: // act: "Phase" -#line 2774 "seclang-parser.yy" +#line 2776 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Phase(yystack_[0].value.as < std::string > ())); } @@ -5115,7 +5115,7 @@ namespace yy { break; case 375: // act: "Prepend" -#line 2778 "seclang-parser.yy" +#line 2780 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Prepend", yystack_[1].location); } @@ -5123,7 +5123,7 @@ namespace yy { break; case 376: // act: "Proxy" -#line 2782 "seclang-parser.yy" +#line 2784 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("Proxy", yystack_[1].location); } @@ -5131,7 +5131,7 @@ namespace yy { break; case 377: // act: "Redirect" run_time_string -#line 2786 "seclang-parser.yy" +#line 2788 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::disruptive::Redirect(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5139,7 +5139,7 @@ namespace yy { break; case 378: // act: "Rev" -#line 2790 "seclang-parser.yy" +#line 2792 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Rev(yystack_[0].value.as < std::string > ())); } @@ -5147,7 +5147,7 @@ namespace yy { break; case 379: // act: "SanitiseArg" -#line 2794 "seclang-parser.yy" +#line 2796 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseArg", yystack_[1].location); } @@ -5155,7 +5155,7 @@ namespace yy { break; case 380: // act: "SanitiseMatched" -#line 2798 "seclang-parser.yy" +#line 2800 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseMatched", yystack_[1].location); } @@ -5163,7 +5163,7 @@ namespace yy { break; case 381: // act: "SanitiseMatchedBytes" -#line 2802 "seclang-parser.yy" +#line 2804 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseMatchedBytes", yystack_[1].location); } @@ -5171,7 +5171,7 @@ namespace yy { break; case 382: // act: "SanitiseRequestHeader" -#line 2806 "seclang-parser.yy" +#line 2808 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseRequestHeader", yystack_[1].location); } @@ -5179,7 +5179,7 @@ namespace yy { break; case 383: // act: "SanitiseResponseHeader" -#line 2810 "seclang-parser.yy" +#line 2812 "seclang-parser.yy" { ACTION_NOT_SUPPORTED("SanitiseResponseHeader", yystack_[1].location); } @@ -5187,7 +5187,7 @@ namespace yy { break; case 384: // act: "SetEnv" run_time_string -#line 2814 "seclang-parser.yy" +#line 2816 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetENV(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5195,7 +5195,7 @@ namespace yy { break; case 385: // act: "SetRsc" run_time_string -#line 2818 "seclang-parser.yy" +#line 2820 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetRSC(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5203,7 +5203,7 @@ namespace yy { break; case 386: // act: "SetSid" run_time_string -#line 2822 "seclang-parser.yy" +#line 2824 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetSID(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5211,7 +5211,7 @@ namespace yy { break; case 387: // act: "SetUID" run_time_string -#line 2826 "seclang-parser.yy" +#line 2828 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SetUID(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5219,7 +5219,7 @@ namespace yy { break; case 388: // act: "SetVar" setvar_action -#line 2830 "seclang-parser.yy" +#line 2832 "seclang-parser.yy" { yylhs.value.as < std::unique_ptr > () = std::move(yystack_[0].value.as < std::unique_ptr > ()); } @@ -5227,7 +5227,7 @@ namespace yy { break; case 389: // act: "Severity" -#line 2834 "seclang-parser.yy" +#line 2836 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Severity(yystack_[0].value.as < std::string > ())); } @@ -5235,7 +5235,7 @@ namespace yy { break; case 390: // act: "Skip" -#line 2838 "seclang-parser.yy" +#line 2840 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Skip(yystack_[0].value.as < std::string > ())); } @@ -5243,7 +5243,7 @@ namespace yy { break; case 391: // act: "SkipAfter" -#line 2842 "seclang-parser.yy" +#line 2844 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::SkipAfter(yystack_[0].value.as < std::string > ())); } @@ -5251,7 +5251,7 @@ namespace yy { break; case 392: // act: "Status" -#line 2846 "seclang-parser.yy" +#line 2848 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::data::Status(yystack_[0].value.as < std::string > ())); } @@ -5259,7 +5259,7 @@ namespace yy { break; case 393: // act: "Tag" run_time_string -#line 2850 "seclang-parser.yy" +#line 2852 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Tag(std::move(yystack_[0].value.as < std::unique_ptr > ()))); } @@ -5267,7 +5267,7 @@ namespace yy { break; case 394: // act: "Ver" -#line 2854 "seclang-parser.yy" +#line 2856 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::Ver(yystack_[0].value.as < std::string > ())); } @@ -5275,7 +5275,7 @@ namespace yy { break; case 395: // act: "xmlns" -#line 2858 "seclang-parser.yy" +#line 2860 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::XmlNS(yystack_[0].value.as < std::string > ())); } @@ -5283,7 +5283,7 @@ namespace yy { break; case 396: // act: "ACTION_TRANSFORMATION_PARITY_ZERO_7_BIT" -#line 2862 "seclang-parser.yy" +#line 2864 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityZero7bit(yystack_[0].value.as < std::string > ())); } @@ -5291,7 +5291,7 @@ namespace yy { break; case 397: // act: "ACTION_TRANSFORMATION_PARITY_ODD_7_BIT" -#line 2866 "seclang-parser.yy" +#line 2868 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityOdd7bit(yystack_[0].value.as < std::string > ())); } @@ -5299,7 +5299,7 @@ namespace yy { break; case 398: // act: "ACTION_TRANSFORMATION_PARITY_EVEN_7_BIT" -#line 2870 "seclang-parser.yy" +#line 2872 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ParityEven7bit(yystack_[0].value.as < std::string > ())); } @@ -5307,7 +5307,7 @@ namespace yy { break; case 399: // act: "ACTION_TRANSFORMATION_SQL_HEX_DECODE" -#line 2874 "seclang-parser.yy" +#line 2876 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::SqlHexDecode(yystack_[0].value.as < std::string > ())); } @@ -5315,7 +5315,7 @@ namespace yy { break; case 400: // act: "ACTION_TRANSFORMATION_BASE_64_ENCODE" -#line 2878 "seclang-parser.yy" +#line 2880 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64Encode(yystack_[0].value.as < std::string > ())); } @@ -5323,7 +5323,7 @@ namespace yy { break; case 401: // act: "ACTION_TRANSFORMATION_BASE_64_DECODE" -#line 2882 "seclang-parser.yy" +#line 2884 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64Decode(yystack_[0].value.as < std::string > ())); } @@ -5331,7 +5331,7 @@ namespace yy { break; case 402: // act: "ACTION_TRANSFORMATION_BASE_64_DECODE_EXT" -#line 2886 "seclang-parser.yy" +#line 2888 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Base64DecodeExt(yystack_[0].value.as < std::string > ())); } @@ -5339,7 +5339,7 @@ namespace yy { break; case 403: // act: "ACTION_TRANSFORMATION_CMD_LINE" -#line 2890 "seclang-parser.yy" +#line 2892 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CmdLine(yystack_[0].value.as < std::string > ())); } @@ -5347,7 +5347,7 @@ namespace yy { break; case 404: // act: "ACTION_TRANSFORMATION_SHA1" -#line 2894 "seclang-parser.yy" +#line 2896 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Sha1(yystack_[0].value.as < std::string > ())); } @@ -5355,7 +5355,7 @@ namespace yy { break; case 405: // act: "ACTION_TRANSFORMATION_MD5" -#line 2898 "seclang-parser.yy" +#line 2900 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Md5(yystack_[0].value.as < std::string > ())); } @@ -5363,7 +5363,7 @@ namespace yy { break; case 406: // act: "ACTION_TRANSFORMATION_ESCAPE_SEQ_DECODE" -#line 2902 "seclang-parser.yy" +#line 2904 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::EscapeSeqDecode(yystack_[0].value.as < std::string > ())); } @@ -5371,7 +5371,7 @@ namespace yy { break; case 407: // act: "ACTION_TRANSFORMATION_HEX_ENCODE" -#line 2906 "seclang-parser.yy" +#line 2908 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HexEncode(yystack_[0].value.as < std::string > ())); } @@ -5379,7 +5379,7 @@ namespace yy { break; case 408: // act: "ACTION_TRANSFORMATION_HEX_DECODE" -#line 2910 "seclang-parser.yy" +#line 2912 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HexDecode(yystack_[0].value.as < std::string > ())); } @@ -5387,7 +5387,7 @@ namespace yy { break; case 409: // act: "ACTION_TRANSFORMATION_LOWERCASE" -#line 2914 "seclang-parser.yy" +#line 2916 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::LowerCase(yystack_[0].value.as < std::string > ())); } @@ -5395,7 +5395,7 @@ namespace yy { break; case 410: // act: "ACTION_TRANSFORMATION_UPPERCASE" -#line 2918 "seclang-parser.yy" +#line 2920 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UpperCase(yystack_[0].value.as < std::string > ())); } @@ -5403,7 +5403,7 @@ namespace yy { break; case 411: // act: "ACTION_TRANSFORMATION_URL_DECODE_UNI" -#line 2922 "seclang-parser.yy" +#line 2924 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlDecodeUni(yystack_[0].value.as < std::string > ())); } @@ -5411,7 +5411,7 @@ namespace yy { break; case 412: // act: "ACTION_TRANSFORMATION_URL_DECODE" -#line 2926 "seclang-parser.yy" +#line 2928 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlDecode(yystack_[0].value.as < std::string > ())); } @@ -5419,7 +5419,7 @@ namespace yy { break; case 413: // act: "ACTION_TRANSFORMATION_URL_ENCODE" -#line 2930 "seclang-parser.yy" +#line 2932 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::UrlEncode(yystack_[0].value.as < std::string > ())); } @@ -5427,7 +5427,7 @@ namespace yy { break; case 414: // act: "ACTION_TRANSFORMATION_NONE" -#line 2934 "seclang-parser.yy" +#line 2936 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::None(yystack_[0].value.as < std::string > ())); } @@ -5435,7 +5435,7 @@ namespace yy { break; case 415: // act: "ACTION_TRANSFORMATION_COMPRESS_WHITESPACE" -#line 2938 "seclang-parser.yy" +#line 2940 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CompressWhitespace(yystack_[0].value.as < std::string > ())); } @@ -5443,7 +5443,7 @@ namespace yy { break; case 416: // act: "ACTION_TRANSFORMATION_REMOVE_WHITESPACE" -#line 2942 "seclang-parser.yy" +#line 2944 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveWhitespace(yystack_[0].value.as < std::string > ())); } @@ -5451,7 +5451,7 @@ namespace yy { break; case 417: // act: "ACTION_TRANSFORMATION_REPLACE_NULLS" -#line 2946 "seclang-parser.yy" +#line 2948 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ReplaceNulls(yystack_[0].value.as < std::string > ())); } @@ -5459,7 +5459,7 @@ namespace yy { break; case 418: // act: "ACTION_TRANSFORMATION_REMOVE_NULLS" -#line 2950 "seclang-parser.yy" +#line 2952 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveNulls(yystack_[0].value.as < std::string > ())); } @@ -5467,7 +5467,7 @@ namespace yy { break; case 419: // act: "ACTION_TRANSFORMATION_HTML_ENTITY_DECODE" -#line 2954 "seclang-parser.yy" +#line 2956 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::HtmlEntityDecode(yystack_[0].value.as < std::string > ())); } @@ -5475,7 +5475,7 @@ namespace yy { break; case 420: // act: "ACTION_TRANSFORMATION_JS_DECODE" -#line 2958 "seclang-parser.yy" +#line 2960 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::JsDecode(yystack_[0].value.as < std::string > ())); } @@ -5483,7 +5483,7 @@ namespace yy { break; case 421: // act: "ACTION_TRANSFORMATION_CSS_DECODE" -#line 2962 "seclang-parser.yy" +#line 2964 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::CssDecode(yystack_[0].value.as < std::string > ())); } @@ -5491,7 +5491,7 @@ namespace yy { break; case 422: // act: "ACTION_TRANSFORMATION_TRIM" -#line 2966 "seclang-parser.yy" +#line 2968 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Trim(yystack_[0].value.as < std::string > ())); } @@ -5499,7 +5499,7 @@ namespace yy { break; case 423: // act: "ACTION_TRANSFORMATION_TRIM_LEFT" -#line 2970 "seclang-parser.yy" +#line 2972 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::TrimLeft(yystack_[0].value.as < std::string > ())); } @@ -5507,7 +5507,7 @@ namespace yy { break; case 424: // act: "ACTION_TRANSFORMATION_TRIM_RIGHT" -#line 2974 "seclang-parser.yy" +#line 2976 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::TrimRight(yystack_[0].value.as < std::string > ())); } @@ -5515,7 +5515,7 @@ namespace yy { break; case 425: // act: "ACTION_TRANSFORMATION_NORMALISE_PATH_WIN" -#line 2978 "seclang-parser.yy" +#line 2980 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::NormalisePathWin(yystack_[0].value.as < std::string > ())); } @@ -5523,7 +5523,7 @@ namespace yy { break; case 426: // act: "ACTION_TRANSFORMATION_NORMALISE_PATH" -#line 2982 "seclang-parser.yy" +#line 2984 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::NormalisePath(yystack_[0].value.as < std::string > ())); } @@ -5531,7 +5531,7 @@ namespace yy { break; case 427: // act: "ACTION_TRANSFORMATION_LENGTH" -#line 2986 "seclang-parser.yy" +#line 2988 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Length(yystack_[0].value.as < std::string > ())); } @@ -5539,7 +5539,7 @@ namespace yy { break; case 428: // act: "ACTION_TRANSFORMATION_UTF8_TO_UNICODE" -#line 2990 "seclang-parser.yy" +#line 2992 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::Utf8ToUnicode(yystack_[0].value.as < std::string > ())); } @@ -5547,7 +5547,7 @@ namespace yy { break; case 429: // act: "ACTION_TRANSFORMATION_REMOVE_COMMENTS_CHAR" -#line 2994 "seclang-parser.yy" +#line 2996 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveCommentsChar(yystack_[0].value.as < std::string > ())); } @@ -5555,7 +5555,7 @@ namespace yy { break; case 430: // act: "ACTION_TRANSFORMATION_REMOVE_COMMENTS" -#line 2998 "seclang-parser.yy" +#line 3000 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::RemoveComments(yystack_[0].value.as < std::string > ())); } @@ -5563,7 +5563,7 @@ namespace yy { break; case 431: // act: "ACTION_TRANSFORMATION_REPLACE_COMMENTS" -#line 3002 "seclang-parser.yy" +#line 3004 "seclang-parser.yy" { ACTION_CONTAINER(yylhs.value.as < std::unique_ptr > (), new actions::transformations::ReplaceComments(yystack_[0].value.as < std::string > ())); } @@ -5571,7 +5571,7 @@ namespace yy { break; case 432: // setvar_action: "NOT" var -#line 3009 "seclang-parser.yy" +#line 3011 "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 > ()))); } @@ -5579,7 +5579,7 @@ namespace yy { break; case 433: // setvar_action: var -#line 3013 "seclang-parser.yy" +#line 3015 "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 > ()))); } @@ -5587,7 +5587,7 @@ namespace yy { break; case 434: // setvar_action: var SETVAR_OPERATION_EQUALS run_time_string -#line 3017 "seclang-parser.yy" +#line 3019 "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 > ()))); } @@ -5595,7 +5595,7 @@ namespace yy { break; case 435: // setvar_action: var SETVAR_OPERATION_EQUALS_PLUS run_time_string -#line 3021 "seclang-parser.yy" +#line 3023 "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 > ()))); } @@ -5603,7 +5603,7 @@ namespace yy { break; case 436: // setvar_action: var SETVAR_OPERATION_EQUALS_MINUS run_time_string -#line 3025 "seclang-parser.yy" +#line 3027 "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 > ()))); } @@ -5611,7 +5611,7 @@ namespace yy { break; case 437: // run_time_string: run_time_string "FREE_TEXT_QUOTE_MACRO_EXPANSION" -#line 3032 "seclang-parser.yy" +#line 3034 "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 > ()); @@ -5620,7 +5620,7 @@ namespace yy { break; case 438: // run_time_string: run_time_string var -#line 3037 "seclang-parser.yy" +#line 3039 "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 > ()); @@ -5629,7 +5629,7 @@ namespace yy { break; case 439: // run_time_string: "FREE_TEXT_QUOTE_MACRO_EXPANSION" -#line 3042 "seclang-parser.yy" +#line 3044 "seclang-parser.yy" { std::unique_ptr r(new RunTimeString()); r->appendText(yystack_[0].value.as < std::string > ()); @@ -5639,7 +5639,7 @@ namespace yy { break; case 440: // run_time_string: var -#line 3048 "seclang-parser.yy" +#line 3050 "seclang-parser.yy" { std::unique_ptr r(new RunTimeString()); r->appendVar(std::move(yystack_[0].value.as < std::unique_ptr > ())); @@ -7142,51 +7142,51 @@ namespace yy { const short seclang_parser::yyrline_[] = { - 0, 710, 710, 714, 715, 718, 723, 729, 735, 739, - 743, 749, 755, 761, 767, 772, 777, 783, 790, 794, - 798, 804, 808, 812, 817, 822, 827, 832, 836, 843, - 847, 854, 860, 870, 879, 889, 898, 911, 915, 919, - 923, 927, 931, 935, 939, 943, 947, 952, 956, 960, - 964, 968, 972, 977, 982, 986, 990, 994, 998, 1002, - 1006, 1010, 1014, 1018, 1022, 1026, 1030, 1034, 1038, 1042, - 1046, 1050, 1054, 1058, 1072, 1073, 1105, 1124, 1145, 1175, - 1237, 1244, 1248, 1252, 1256, 1260, 1264, 1268, 1272, 1281, - 1285, 1290, 1293, 1298, 1303, 1308, 1313, 1316, 1321, 1324, - 1329, 1334, 1337, 1342, 1347, 1352, 1357, 1362, 1367, 1372, - 1375, 1380, 1385, 1390, 1395, 1398, 1403, 1408, 1413, 1426, - 1439, 1452, 1465, 1478, 1504, 1532, 1544, 1564, 1591, 1597, - 1602, 1607, 1616, 1621, 1625, 1629, 1633, 1637, 1641, 1645, - 1650, 1655, 1667, 1673, 1677, 1681, 1692, 1701, 1702, 1709, - 1714, 1719, 1773, 1780, 1788, 1825, 1829, 1836, 1841, 1847, - 1853, 1859, 1866, 1876, 1880, 1884, 1888, 1892, 1896, 1900, - 1904, 1908, 1912, 1916, 1920, 1924, 1928, 1932, 1936, 1940, - 1944, 1948, 1952, 1956, 1960, 1964, 1968, 1972, 1976, 1980, - 1984, 1988, 1992, 1996, 2000, 2004, 2008, 2012, 2016, 2020, - 2024, 2028, 2032, 2036, 2040, 2044, 2048, 2052, 2056, 2060, - 2064, 2068, 2072, 2076, 2080, 2084, 2088, 2092, 2096, 2100, - 2104, 2108, 2112, 2116, 2120, 2124, 2128, 2132, 2136, 2140, - 2144, 2148, 2152, 2156, 2160, 2164, 2168, 2172, 2176, 2180, - 2184, 2188, 2192, 2196, 2200, 2204, 2208, 2212, 2216, 2220, - 2224, 2228, 2232, 2237, 2241, 2245, 2250, 2254, 2258, 2263, - 2268, 2272, 2276, 2280, 2284, 2288, 2292, 2296, 2300, 2304, - 2308, 2312, 2316, 2320, 2324, 2328, 2332, 2336, 2340, 2344, - 2348, 2352, 2356, 2360, 2364, 2368, 2372, 2376, 2380, 2384, - 2388, 2392, 2396, 2400, 2404, 2408, 2412, 2416, 2420, 2424, - 2428, 2432, 2436, 2440, 2444, 2448, 2452, 2456, 2460, 2464, - 2468, 2472, 2476, 2480, 2484, 2488, 2492, 2496, 2500, 2504, - 2508, 2516, 2523, 2530, 2537, 2544, 2551, 2558, 2565, 2572, - 2579, 2586, 2593, 2603, 2607, 2611, 2615, 2619, 2623, 2627, - 2631, 2636, 2641, 2646, 2650, 2654, 2658, 2662, 2667, 2672, - 2676, 2680, 2684, 2688, 2692, 2696, 2700, 2704, 2708, 2712, - 2716, 2720, 2724, 2729, 2733, 2737, 2741, 2745, 2749, 2753, - 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, 2989, 2993, - 2997, 3001, 3008, 3012, 3016, 3020, 3024, 3031, 3036, 3041, - 3047 + 0, 712, 712, 716, 717, 720, 725, 731, 737, 741, + 745, 751, 757, 763, 769, 774, 779, 785, 792, 796, + 800, 806, 810, 814, 819, 824, 829, 834, 838, 845, + 849, 856, 862, 872, 881, 891, 900, 913, 917, 921, + 925, 929, 933, 937, 941, 945, 949, 954, 958, 962, + 966, 970, 974, 979, 984, 988, 992, 996, 1000, 1004, + 1008, 1012, 1016, 1020, 1024, 1028, 1032, 1036, 1040, 1044, + 1048, 1052, 1056, 1060, 1074, 1075, 1107, 1126, 1147, 1177, + 1239, 1246, 1250, 1254, 1258, 1262, 1266, 1270, 1274, 1283, + 1287, 1292, 1295, 1300, 1305, 1310, 1315, 1318, 1323, 1326, + 1331, 1336, 1339, 1344, 1349, 1354, 1359, 1364, 1369, 1374, + 1377, 1382, 1387, 1392, 1397, 1400, 1405, 1410, 1415, 1428, + 1441, 1454, 1467, 1480, 1506, 1534, 1546, 1566, 1593, 1599, + 1604, 1609, 1618, 1623, 1627, 1631, 1635, 1639, 1643, 1647, + 1652, 1657, 1669, 1675, 1679, 1683, 1694, 1703, 1704, 1711, + 1716, 1721, 1775, 1782, 1790, 1827, 1831, 1838, 1843, 1849, + 1855, 1861, 1868, 1878, 1882, 1886, 1890, 1894, 1898, 1902, + 1906, 1910, 1914, 1918, 1922, 1926, 1930, 1934, 1938, 1942, + 1946, 1950, 1954, 1958, 1962, 1966, 1970, 1974, 1978, 1982, + 1986, 1990, 1994, 1998, 2002, 2006, 2010, 2014, 2018, 2022, + 2026, 2030, 2034, 2038, 2042, 2046, 2050, 2054, 2058, 2062, + 2066, 2070, 2074, 2078, 2082, 2086, 2090, 2094, 2098, 2102, + 2106, 2110, 2114, 2118, 2122, 2126, 2130, 2134, 2138, 2142, + 2146, 2150, 2154, 2158, 2162, 2166, 2170, 2174, 2178, 2182, + 2186, 2190, 2194, 2198, 2202, 2206, 2210, 2214, 2218, 2222, + 2226, 2230, 2234, 2239, 2243, 2247, 2252, 2256, 2260, 2265, + 2270, 2274, 2278, 2282, 2286, 2290, 2294, 2298, 2302, 2306, + 2310, 2314, 2318, 2322, 2326, 2330, 2334, 2338, 2342, 2346, + 2350, 2354, 2358, 2362, 2366, 2370, 2374, 2378, 2382, 2386, + 2390, 2394, 2398, 2402, 2406, 2410, 2414, 2418, 2422, 2426, + 2430, 2434, 2438, 2442, 2446, 2450, 2454, 2458, 2462, 2466, + 2470, 2474, 2478, 2482, 2486, 2490, 2494, 2498, 2502, 2506, + 2510, 2518, 2525, 2532, 2539, 2546, 2553, 2560, 2567, 2574, + 2581, 2588, 2595, 2605, 2609, 2613, 2617, 2621, 2625, 2629, + 2633, 2638, 2643, 2648, 2652, 2656, 2660, 2664, 2669, 2674, + 2678, 2682, 2686, 2690, 2694, 2698, 2702, 2706, 2710, 2714, + 2718, 2722, 2726, 2731, 2735, 2739, 2743, 2747, 2751, 2755, + 2759, 2763, 2767, 2771, 2775, 2779, 2783, 2787, 2791, 2795, + 2799, 2803, 2807, 2811, 2815, 2819, 2823, 2827, 2831, 2835, + 2839, 2843, 2847, 2851, 2855, 2859, 2863, 2867, 2871, 2875, + 2879, 2883, 2887, 2891, 2895, 2899, 2903, 2907, 2911, 2915, + 2919, 2923, 2927, 2931, 2935, 2939, 2943, 2947, 2951, 2955, + 2959, 2963, 2967, 2971, 2975, 2979, 2983, 2987, 2991, 2995, + 2999, 3003, 3010, 3014, 3018, 3022, 3026, 3033, 3038, 3043, + 3049 }; void @@ -7220,7 +7220,7 @@ namespace yy { } // yy #line 7222 "seclang-parser.cc" -#line 3054 "seclang-parser.yy" +#line 3056 "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 cc0ecc82..877d9a29 100644 --- a/src/parser/seclang-parser.hh +++ b/src/parser/seclang-parser.hh @@ -56,7 +56,9 @@ class Driver; } } -#include "modsecurity/rule_unconditional.h" +#include "src/rule_unconditional.h" +#include "src/rule_with_operator.h" +#include "src/rule_with_actions.h" #include "src/rule_script.h" #include "src/actions/accuracy.h" @@ -350,7 +352,7 @@ using namespace modsecurity::operators; a = std::move(c); -#line 354 "seclang-parser.hh" +#line 356 "seclang-parser.hh" # include # include // std::abort @@ -484,7 +486,7 @@ using namespace modsecurity::operators; #endif namespace yy { -#line 488 "seclang-parser.hh" +#line 490 "seclang-parser.hh" @@ -8603,7 +8605,7 @@ switch (yykind) } } // yy -#line 8607 "seclang-parser.hh" +#line 8609 "seclang-parser.hh" diff --git a/src/parser/seclang-parser.yy b/src/parser/seclang-parser.yy index 480dc9e0..da4353b0 100644 --- a/src/parser/seclang-parser.yy +++ b/src/parser/seclang-parser.yy @@ -17,9 +17,9 @@ class Driver; } } -#include "modsecurity/rule_unconditional.h" -#include "modsecurity/rule_with_operator.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_unconditional.h" +#include "src/rule_with_operator.h" +#include "src/rule_with_actions.h" #include "src/rule_script.h" #include "src/actions/accuracy.h" diff --git a/headers/modsecurity/rule_marker.h b/src/rule_marker.h similarity index 100% rename from headers/modsecurity/rule_marker.h rename to src/rule_marker.h diff --git a/src/rule_message.cc b/src/rule_message.cc index 70712d4a..31bf1903 100644 --- a/src/rule_message.cc +++ b/src/rule_message.cc @@ -20,7 +20,7 @@ #include "modsecurity/transaction.h" #include "src/utils/string.h" #include "src/actions/tag.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/rule_script.h b/src/rule_script.h index 6375d8ee..eaeef2fa 100644 --- a/src/rule_script.h +++ b/src/rule_script.h @@ -32,7 +32,7 @@ #include "src/actions/log_data.h" #include "src/actions/severity.h" #include "src/variables/variable.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" #ifndef SRC_RULE_SCRIPT_H_ diff --git a/src/rule_unconditional.cc b/src/rule_unconditional.cc index 5f5390bd..abd79dfa 100644 --- a/src/rule_unconditional.cc +++ b/src/rule_unconditional.cc @@ -13,7 +13,7 @@ * */ -#include "modsecurity/rule_unconditional.h" +#include "src/rule_unconditional.h" namespace modsecurity { diff --git a/headers/modsecurity/rule_unconditional.h b/src/rule_unconditional.h similarity index 87% rename from headers/modsecurity/rule_unconditional.h rename to src/rule_unconditional.h index a10b5993..f1b44f99 100644 --- a/headers/modsecurity/rule_unconditional.h +++ b/src/rule_unconditional.h @@ -22,15 +22,15 @@ #include #endif -#ifndef HEADERS_MODSECURITY_RULE_UNCONDITIONAL_H_ -#define HEADERS_MODSECURITY_RULE_UNCONDITIONAL_H_ +#ifndef SRC_RULE_UNCONDITIONAL_H_ +#define SRC_RULE_UNCONDITIONAL_H_ #include "modsecurity/modsecurity.h" #include "modsecurity/variable_value.h" #include "modsecurity/rule.h" #include "modsecurity/rules_set.h" -#include "modsecurity/rule_with_actions.h" #include "modsecurity/actions/action.h" +#include "src/rule_with_actions.h" #ifdef __cplusplus @@ -60,4 +60,4 @@ class RuleUnconditional : public RuleWithActions { #endif -#endif // HEADERS_MODSECURITY_RULE_UNCONDITIONAL_H_ +#endif // SRC_RULE_UNCONDITIONAL_H_ diff --git a/src/rule_with_actions.cc b/src/rule_with_actions.cc index 27abceb2..bfbbcb85 100644 --- a/src/rule_with_actions.cc +++ b/src/rule_with_actions.cc @@ -29,7 +29,7 @@ #include "modsecurity/modsecurity.h" #include "modsecurity/rule_message.h" #include "modsecurity/rules_set.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" #include "src/actions/accuracy.h" #include "src/actions/block.h" #include "src/actions/capture.h" @@ -360,10 +360,8 @@ void RuleWithActions::executeTransformations( int none = 0; ModSecString ssin; - ssin.assign(in.c_str()); - - TransformationResult a = TransformationResult(&ssin); - results.push_back(a); + ssin.assign(in.c_str(), in.size()); + results.push_back(TransformationResult(&ssin)); std::string path(""); @@ -418,8 +416,8 @@ void RuleWithActions::executeTransformations( + std::to_string(results.size()) + \ " values to be tested."); } else { - results.pop_front(); - results.push_back(TransformationResult(&ssin)); + //results.push_back(TransformationResult(nullptr, ssin)); + //results.pop_front(); } */ } @@ -441,7 +439,7 @@ void RuleWithActions::executeTransformation( void RuleWithActions::executeTransformation( Transaction *transaction, - ModSecString in, + ModSecString &in, TransformationsResults *ret, Transformation *transformation) { diff --git a/headers/modsecurity/rule_with_actions.h b/src/rule_with_actions.h similarity index 99% rename from headers/modsecurity/rule_with_actions.h rename to src/rule_with_actions.h index 085a65dd..d67042b5 100644 --- a/headers/modsecurity/rule_with_actions.h +++ b/src/rule_with_actions.h @@ -22,8 +22,8 @@ #include #endif -#ifndef HEADERS_MODSECURITY_RULE_WITH_ACTIONS_H_ -#define HEADERS_MODSECURITY_RULE_WITH_ACTIONS_H_ +#ifndef SRC_RULE_WITH_ACTIONS_H_ +#define SRC_RULE_WITH_ACTIONS_H_ #include "modsecurity/transaction.h" #include "modsecurity/modsecurity.h" @@ -223,7 +223,7 @@ class RuleWithActions : public Rule { static void executeTransformation( Transaction *transaction, - ModSecString in, + ModSecString &in, TransformationsResults *ret, Transformation *transformation); @@ -545,4 +545,5 @@ class RuleWithActions : public Rule { #endif -#endif // HEADERS_MODSECURITY_RULE_WITH_ACTIONS_H_ \ No newline at end of file +#endif // SRC_RULE_WITH_ACTIONS_H_ + diff --git a/src/rule_with_operator.cc b/src/rule_with_operator.cc index b56cf819..9ada85c1 100644 --- a/src/rule_with_operator.cc +++ b/src/rule_with_operator.cc @@ -13,7 +13,6 @@ * */ -#include "modsecurity/rule_with_operator.h" #include @@ -41,6 +40,7 @@ #include "src/actions/set_var.h" #include "src/actions/block.h" #include "src/variables/variable.h" +#include "src/rule_with_operator.h" namespace modsecurity { @@ -265,6 +265,7 @@ bool RuleWithOperator::evaluate(Transaction *trans) { } var->evaluate(trans, this, &e); for (const VariableValue *v : e) { + TransformationsResults transformationsResults; const std::string &value = v->getValue(); const std::string &key = v->getKeyWithCollection(); @@ -291,8 +292,6 @@ bool RuleWithOperator::evaluate(Transaction *trans) { continue; } - TransformationsResults transformationsResults; - executeTransformations(trans, value, transformationsResults); auto iter = transformationsResults.begin(); @@ -303,8 +302,8 @@ bool RuleWithOperator::evaluate(Transaction *trans) { while (iter != transformationsResults.end()) { bool ret; auto &valueTemp = *iter; - // FIXME: this copy is not necessary. - std::string *valueAfterTrans = new std::string(valueTemp.getAfter()->c_str()); + // FIXME: this copy is not necessary. + std::string *valueAfterTrans = new std::string(valueTemp.getAfter()->c_str(), valueTemp.getAfter()->size()); ret = executeOperatorAt(trans, key, *valueAfterTrans); @@ -315,6 +314,7 @@ bool RuleWithOperator::evaluate(Transaction *trans) { for (auto &i : v->getOrigin()) { trans->messageGetLast()->m_reference.append(i->toText()); } + auto iter2 = transformationsResults.begin(); while (iter2 != transformationsResults.end()) { if (iter2->getTransformationName()) { @@ -323,8 +323,8 @@ bool RuleWithOperator::evaluate(Transaction *trans) { /* if (iter == iter2) { break; - } else { - trans->messageGetLast()->m_reference.append("--"); + } else if (iter2->getTransformationName()) { + trans->messageGetLast()->m_reference.append(","); } */ iter2++; diff --git a/headers/modsecurity/rule_with_operator.h b/src/rule_with_operator.h similarity index 90% rename from headers/modsecurity/rule_with_operator.h rename to src/rule_with_operator.h index 71da6ddf..b7cf3065 100644 --- a/headers/modsecurity/rule_with_operator.h +++ b/src/rule_with_operator.h @@ -22,20 +22,19 @@ #include #endif -#ifndef HEADERS_MODSECURITY_RULE_WITH_OPERATOR_H_ -#define HEADERS_MODSECURITY_RULE_WITH_OPERATOR_H_ +#ifndef SRC_RULE_WITH_OPERATOR_H_ +#define SRC_RULE_WITH_OPERATOR_H_ #include "modsecurity/transaction.h" #include "modsecurity/modsecurity.h" #include "modsecurity/variable_value.h" #include "modsecurity/rule.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" #ifdef __cplusplus namespace modsecurity { -using TransformationsResults = std::list; class RuleWithOperator : public RuleWithActions { public: @@ -91,4 +90,5 @@ class RuleWithOperator : public RuleWithActions { #endif -#endif // HEADERS_MODSECURITY_RULE_WITH_OPERATOR_H_ +#endif // SRC_RULE_WITH_OPERATOR_H_ + diff --git a/src/rules.cc b/src/rules.cc index b35664fb..e2a70c65 100644 --- a/src/rules.cc +++ b/src/rules.cc @@ -14,7 +14,7 @@ */ #include "modsecurity/rules.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity { diff --git a/src/rules_set.cc b/src/rules_set.cc index 0ca3fbfd..4295e1b2 100644 --- a/src/rules_set.cc +++ b/src/rules_set.cc @@ -20,7 +20,7 @@ #include #include "modsecurity/rules_set.h" -#include "modsecurity/rule_marker.h" +#include "src/rule_marker.h" #include "modsecurity/modsecurity.h" #include "modsecurity/transaction.h" #include "src/parser/driver.h" diff --git a/src/rules_set_phases.cc b/src/rules_set_phases.cc index 184738b1..6f3acd19 100644 --- a/src/rules_set_phases.cc +++ b/src/rules_set_phases.cc @@ -13,17 +13,8 @@ * */ -#include -#include -#include -#include -#include - #include "modsecurity/rules_set_phases.h" -#include "modsecurity/rule.h" -#include "modsecurity/rules.h" -#include "modsecurity/modsecurity.h" - +#include "src/rule_with_operator.h" namespace modsecurity { @@ -47,6 +38,7 @@ int RulesSetPhases::append(RulesSetPhases *from, std::ostringstream *err) { v.reserve(m_rulesAtPhase[i].size()); for (size_t z = 0; z < m_rulesAtPhase[i].size(); z++) { RuleWithOperator *rule_ckc = dynamic_cast(m_rulesAtPhase[i].at(z).get()); + //RuleWithOperator *rule_ckc = dynamic_cast(m_rulesAtPhase->at(i).get()); if (!rule_ckc) { continue; } @@ -62,7 +54,6 @@ int RulesSetPhases::append(RulesSetPhases *from, std::ostringstream *err) { } amount_of_rules = amount_of_rules + res; - /** * An action set in a child will overwrite an action set on a parent. * @@ -91,6 +82,7 @@ int RulesSetPhases::append(RulesSetPhases *from, std::ostringstream *err) { void RulesSetPhases::dump() const { for (int i = 0; i <= modsecurity::Phases::NUMBER_OF_PHASES; i++) { + const Rules *rules = &m_rulesAtPhase[i]; std::cout << "Phase: " << std::to_string(i); std::cout << " (" << std::to_string(m_rulesAtPhase[i].size()); std::cout << " rules)" << std::endl; @@ -99,5 +91,14 @@ void RulesSetPhases::dump() const { } -} // namespace modsecurity +Rules *RulesSetPhases::operator[](int index) { + return &m_rulesAtPhase[index]; +} + +Rules *RulesSetPhases::at(int index) { + return &m_rulesAtPhase[index]; +} + + +} // namespace modsecurity diff --git a/src/run_time_string.cc b/src/run_time_string.cc index a470f5e7..2c433cff 100644 --- a/src/run_time_string.cc +++ b/src/run_time_string.cc @@ -25,7 +25,7 @@ #include "src/variables/highest_severity.h" #include "src/utils/string.h" #include "src/variables/variable.h" -#include "modsecurity/rule_with_operator.h" +#include "src/rule_with_operator.h" namespace modsecurity { diff --git a/src/transaction.cc b/src/transaction.cc index 17b8a889..66674681 100644 --- a/src/transaction.cc +++ b/src/transaction.cc @@ -52,6 +52,7 @@ #include "modsecurity/rules_set_properties.h" #include "src/actions/disruptive/allow.h" #include "src/variables/remote_user.h" +#include "src/rule_with_actions.h" diff --git a/src/variables/rule.h b/src/variables/rule.h index 76d13a8c..1d63d50f 100644 --- a/src/variables/rule.h +++ b/src/variables/rule.h @@ -24,7 +24,8 @@ #include "src/actions/severity.h" #include "src/actions/log_data.h" #include "src/actions/msg.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" + namespace modsecurity { diff --git a/src/variables/xml.cc b/src/variables/xml.cc index 8e434c86..3c9604ce 100644 --- a/src/variables/xml.cc +++ b/src/variables/xml.cc @@ -42,7 +42,7 @@ #include "src/request_body_processor/xml.h" #include "modsecurity/actions/action.h" #include "src/actions/xmlns.h" -#include "modsecurity/rule_with_actions.h" +#include "src/rule_with_actions.h" namespace modsecurity {