diff --git a/headers/modsecurity/assay.h b/headers/modsecurity/assay.h index 12e57704..aa785a05 100644 --- a/headers/modsecurity/assay.h +++ b/headers/modsecurity/assay.h @@ -34,6 +34,7 @@ #define HEADERS_MODSECURITY_ASSAY_H_ #ifndef __cplusplus +typedef struct ModSecurity_t ModSecurity; typedef struct Assay_t Assay; typedef struct Rules_t Rules; #endif @@ -64,7 +65,7 @@ typedef struct Rules_t Rules; #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class ModSecurity; class Assay; diff --git a/headers/modsecurity/debug_log.h b/headers/modsecurity/debug_log.h index 06da831f..310fe9ac 100644 --- a/headers/modsecurity/debug_log.h +++ b/headers/modsecurity/debug_log.h @@ -27,7 +27,7 @@ typedef struct DebugLog_t DebugLog; #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { /** @ingroup ModSecurity_CPP_API */ class DebugLog { diff --git a/headers/modsecurity/intervention.h b/headers/modsecurity/intervention.h index 645b2a58..20ce2555 100644 --- a/headers/modsecurity/intervention.h +++ b/headers/modsecurity/intervention.h @@ -17,7 +17,7 @@ #define HEADERS_MODSECURITY_INTERVENTION_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { #endif typedef struct ModSecurityIntervention_t { diff --git a/headers/modsecurity/modsecurity.h b/headers/modsecurity/modsecurity.h index 6dbb1474..e64d29d2 100644 --- a/headers/modsecurity/modsecurity.h +++ b/headers/modsecurity/modsecurity.h @@ -85,7 +85,7 @@ #ifndef __cplusplus -typedef struct ModSecurity_t ModSecurity; +typedef struct ModSecurity_t modsecurity; #endif @@ -123,7 +123,7 @@ typedef struct ModSecurity_t ModSecurity; typedef void (*LogCb) (void *, const char *); #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { /* few forwarded declarations */ namespace actions { diff --git a/headers/modsecurity/rules.h b/headers/modsecurity/rules.h index 57099a05..5ca01f65 100644 --- a/headers/modsecurity/rules.h +++ b/headers/modsecurity/rules.h @@ -34,7 +34,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Rule; class AuditLog; namespace Parser { diff --git a/headers/modsecurity/rules_properties.h b/headers/modsecurity/rules_properties.h index 4c526e2a..1909a9f4 100644 --- a/headers/modsecurity/rules_properties.h +++ b/headers/modsecurity/rules_properties.h @@ -30,7 +30,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Rule; class AuditLog; namespace actions { diff --git a/headers/modsecurity/transaction/collection.h b/headers/modsecurity/transaction/collection.h index 5b8b6515..35800a4a 100644 --- a/headers/modsecurity/transaction/collection.h +++ b/headers/modsecurity/transaction/collection.h @@ -26,7 +26,7 @@ typedef struct Collection_t Collection; #ifdef __cplusplus #include -namespace ModSecurity { +namespace modsecurity { class Collection : public transaction::Variables { public: diff --git a/headers/modsecurity/transaction/collections.h b/headers/modsecurity/transaction/collections.h index b6b1b5ed..edb7f9cd 100644 --- a/headers/modsecurity/transaction/collections.h +++ b/headers/modsecurity/transaction/collections.h @@ -39,7 +39,7 @@ typedef struct Variable_t Variable; #endif #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace transaction { class Collections : diff --git a/headers/modsecurity/transaction/variable.h b/headers/modsecurity/transaction/variable.h index 7e55860f..6dec0698 100644 --- a/headers/modsecurity/transaction/variable.h +++ b/headers/modsecurity/transaction/variable.h @@ -28,7 +28,7 @@ typedef struct Variable_t Variable; #endif #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace transaction { class Variable { diff --git a/headers/modsecurity/transaction/variables.h b/headers/modsecurity/transaction/variables.h index 3e9f4ee9..89b75ee5 100644 --- a/headers/modsecurity/transaction/variables.h +++ b/headers/modsecurity/transaction/variables.h @@ -33,7 +33,7 @@ typedef struct Variable_t Variables; #endif #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace transaction { class Variables : diff --git a/src/actions/action.cc b/src/actions/action.cc index c0cf9260..2abe998e 100644 --- a/src/actions/action.cc +++ b/src/actions/action.cc @@ -37,7 +37,7 @@ #define IF_MATCH(a) \ if (op.compare(1, std::strlen(#a), #a) == 0) -namespace ModSecurity { +namespace modsecurity { namespace actions { diff --git a/src/actions/action.h b/src/actions/action.h index c01e624c..4263ec12 100644 --- a/src/actions/action.h +++ b/src/actions/action.h @@ -23,7 +23,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; class Rule; diff --git a/src/actions/audit_log.cc b/src/actions/audit_log.cc index d4b26a6d..b4660abe 100644 --- a/src/actions/audit_log.cc +++ b/src/actions/audit_log.cc @@ -20,7 +20,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { bool AuditLog::evaluate(Rule *rule, Assay *assay) { diff --git a/src/actions/audit_log.h b/src/actions/audit_log.h index ff88a7e0..b9aa666e 100644 --- a/src/actions/audit_log.h +++ b/src/actions/audit_log.h @@ -23,7 +23,7 @@ #ifdef __cplusplus class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/block.cc b/src/actions/block.cc index c2cf7ba9..e2287a48 100644 --- a/src/actions/block.cc +++ b/src/actions/block.cc @@ -22,7 +22,7 @@ #include "src/rule.h" #include "modsecurity/intervention.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { Block::Block(std::string action) diff --git a/src/actions/block.h b/src/actions/block.h index 94884e75..1ce2eb92 100644 --- a/src/actions/block.h +++ b/src/actions/block.h @@ -23,7 +23,7 @@ #ifdef __cplusplus class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/capture.cc b/src/actions/capture.cc index 8b8e1a33..cca565d1 100644 --- a/src/actions/capture.cc +++ b/src/actions/capture.cc @@ -28,7 +28,7 @@ #include "operators/contains.h" #include "operators/detect_sqli.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { bool Capture::evaluate(Rule *rule, Assay *assay) { diff --git a/src/actions/capture.h b/src/actions/capture.h index 685eb333..7d6e69fd 100644 --- a/src/actions/capture.h +++ b/src/actions/capture.h @@ -21,7 +21,7 @@ #define SRC_ACTIONS_CAPTURE_H_ -namespace ModSecurity { +namespace modsecurity { class Rule; namespace actions { diff --git a/src/actions/chain.cc b/src/actions/chain.cc index b44aacd4..ab35c3b8 100644 --- a/src/actions/chain.cc +++ b/src/actions/chain.cc @@ -21,7 +21,7 @@ #include "modsecurity/assay.h" #include "src/rule.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { diff --git a/src/actions/chain.h b/src/actions/chain.h index 4a590c44..9ac70d0e 100644 --- a/src/actions/chain.h +++ b/src/actions/chain.h @@ -23,7 +23,7 @@ #ifdef __cplusplus class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; class Rule; diff --git a/src/actions/ctl_audit_log_parts.cc b/src/actions/ctl_audit_log_parts.cc index a6e02b6b..785be168 100644 --- a/src/actions/ctl_audit_log_parts.cc +++ b/src/actions/ctl_audit_log_parts.cc @@ -20,7 +20,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { CtlAuditLogParts::CtlAuditLogParts(std::string action) diff --git a/src/actions/ctl_audit_log_parts.h b/src/actions/ctl_audit_log_parts.h index 85aeab3e..3d6e92c4 100644 --- a/src/actions/ctl_audit_log_parts.h +++ b/src/actions/ctl_audit_log_parts.h @@ -21,7 +21,7 @@ #ifndef SRC_ACTIONS_CTL_AUDIT_LOG_PARTS_H_ #define SRC_ACTIONS_CTL_AUDIT_LOG_PARTS_H_ -namespace ModSecurity { +namespace modsecurity { namespace actions { diff --git a/src/actions/deny.cc b/src/actions/deny.cc index 74fbaa0e..bf6dd0ff 100644 --- a/src/actions/deny.cc +++ b/src/actions/deny.cc @@ -20,7 +20,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { Deny::Deny(std::string action) diff --git a/src/actions/deny.h b/src/actions/deny.h index f6fe63c5..c9d0deae 100644 --- a/src/actions/deny.h +++ b/src/actions/deny.h @@ -21,7 +21,7 @@ #ifndef SRC_ACTIONS_DENY_H_ #define SRC_ACTIONS_DENY_H_ -namespace ModSecurity { +namespace modsecurity { namespace actions { diff --git a/src/actions/log.cc b/src/actions/log.cc index 7547c3e5..c9a4fad8 100644 --- a/src/actions/log.cc +++ b/src/actions/log.cc @@ -20,7 +20,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { bool Log::evaluate(Rule *rule, Assay *assay) { diff --git a/src/actions/log.h b/src/actions/log.h index ab117e5f..559f456c 100644 --- a/src/actions/log.h +++ b/src/actions/log.h @@ -22,7 +22,7 @@ class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/log_data.cc b/src/actions/log_data.cc index 57ced7b8..6ffb6080 100644 --- a/src/actions/log_data.cc +++ b/src/actions/log_data.cc @@ -23,7 +23,7 @@ #include "src/utils.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { LogData::LogData(std::string action) diff --git a/src/actions/log_data.h b/src/actions/log_data.h index 9acba14a..3006e07a 100644 --- a/src/actions/log_data.h +++ b/src/actions/log_data.h @@ -22,7 +22,7 @@ class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/msg.cc b/src/actions/msg.cc index 46943e1a..34d0382b 100644 --- a/src/actions/msg.cc +++ b/src/actions/msg.cc @@ -23,7 +23,7 @@ #include "src/utils.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { Msg::Msg(std::string action) diff --git a/src/actions/msg.h b/src/actions/msg.h index 3bd2cfa2..206dda69 100644 --- a/src/actions/msg.h +++ b/src/actions/msg.h @@ -22,7 +22,7 @@ class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/no_audit_log.cc b/src/actions/no_audit_log.cc index a9483a54..9261a45c 100644 --- a/src/actions/no_audit_log.cc +++ b/src/actions/no_audit_log.cc @@ -20,7 +20,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { bool NoAuditLog::evaluate(Rule *rule, Assay *assay) { diff --git a/src/actions/no_audit_log.h b/src/actions/no_audit_log.h index a49b1e7a..52a13b75 100644 --- a/src/actions/no_audit_log.h +++ b/src/actions/no_audit_log.h @@ -23,7 +23,7 @@ #ifdef __cplusplus class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/pass.cc b/src/actions/pass.cc index 3e9b1cf6..ee37ef83 100644 --- a/src/actions/pass.cc +++ b/src/actions/pass.cc @@ -21,7 +21,7 @@ #include "modsecurity/assay.h" #include "src/rule.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { Pass::Pass(std::string action) diff --git a/src/actions/pass.h b/src/actions/pass.h index f6a2b148..e44b1e69 100644 --- a/src/actions/pass.h +++ b/src/actions/pass.h @@ -21,7 +21,7 @@ #ifndef SRC_ACTIONS_PASS_H_ #define SRC_ACTIONS_PASS_H_ -namespace ModSecurity { +namespace modsecurity { namespace actions { diff --git a/src/actions/phase.cc b/src/actions/phase.cc index 10aae31d..4eeedb69 100644 --- a/src/actions/phase.cc +++ b/src/actions/phase.cc @@ -23,7 +23,7 @@ #include "src/utils.h" #include "modsecurity/modsecurity.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { Phase::Phase(std::string action) diff --git a/src/actions/phase.h b/src/actions/phase.h index a19043b7..ec81097f 100644 --- a/src/actions/phase.h +++ b/src/actions/phase.h @@ -23,7 +23,7 @@ #ifdef __cplusplus class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; class Rule; diff --git a/src/actions/redirect.cc b/src/actions/redirect.cc index f3696b9d..6d472103 100644 --- a/src/actions/redirect.cc +++ b/src/actions/redirect.cc @@ -21,7 +21,7 @@ #include "modsecurity/assay.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { Redirect::~Redirect() { diff --git a/src/actions/redirect.h b/src/actions/redirect.h index 24bb55b5..c6be9de0 100644 --- a/src/actions/redirect.h +++ b/src/actions/redirect.h @@ -23,7 +23,7 @@ #ifdef __cplusplus class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/rev.cc b/src/actions/rev.cc index ae7b8b13..c0649de9 100644 --- a/src/actions/rev.cc +++ b/src/actions/rev.cc @@ -24,7 +24,7 @@ #include "src/rule.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { Rev::Rev(std::string action) diff --git a/src/actions/rev.h b/src/actions/rev.h index a77536a0..980000fd 100644 --- a/src/actions/rev.h +++ b/src/actions/rev.h @@ -22,7 +22,7 @@ class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/rule_id.cc b/src/actions/rule_id.cc index c208ea2f..31ceb404 100644 --- a/src/actions/rule_id.cc +++ b/src/actions/rule_id.cc @@ -21,7 +21,7 @@ #include "modsecurity/assay.h" #include "src/rule.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { bool RuleId::init(std::string *error) { diff --git a/src/actions/rule_id.h b/src/actions/rule_id.h index c17d1ff9..5b7d7e13 100644 --- a/src/actions/rule_id.h +++ b/src/actions/rule_id.h @@ -23,7 +23,7 @@ #ifdef __cplusplus class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; class Rule; diff --git a/src/actions/set_var.cc b/src/actions/set_var.cc index 96e93e00..e30ebbef 100644 --- a/src/actions/set_var.cc +++ b/src/actions/set_var.cc @@ -23,7 +23,7 @@ #include "src/macro_expansion.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { SetVar::SetVar(std::string action) diff --git a/src/actions/set_var.h b/src/actions/set_var.h index 3f0d46c4..84e051bc 100644 --- a/src/actions/set_var.h +++ b/src/actions/set_var.h @@ -20,7 +20,7 @@ #ifndef SRC_ACTIONS_SET_VAR_H_ #define SRC_ACTIONS_SET_VAR_H_ -namespace ModSecurity { +namespace modsecurity { class Assay; class Rule; @@ -33,7 +33,7 @@ class SetVar : public Action { bool evaluate(Rule *rule, Assay *assay) override; void dump(); - bool init(std::string *error); + bool init(std::string *error) override; std::string collectionName; std::string variableName; diff --git a/src/actions/severity.cc b/src/actions/severity.cc index 6fd41fac..1278f9ce 100644 --- a/src/actions/severity.cc +++ b/src/actions/severity.cc @@ -22,7 +22,7 @@ #include "modsecurity/assay.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { Severity::Severity(std::string action) diff --git a/src/actions/severity.h b/src/actions/severity.h index 0537b7bc..ecbeca94 100644 --- a/src/actions/severity.h +++ b/src/actions/severity.h @@ -23,7 +23,7 @@ #ifdef __cplusplus class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/skip_after.cc b/src/actions/skip_after.cc index f540af38..75693263 100644 --- a/src/actions/skip_after.cc +++ b/src/actions/skip_after.cc @@ -22,7 +22,7 @@ #include "modsecurity/assay.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { SkipAfter::SkipAfter(std::string action) diff --git a/src/actions/skip_after.h b/src/actions/skip_after.h index 64a5db00..fa69fb32 100644 --- a/src/actions/skip_after.h +++ b/src/actions/skip_after.h @@ -22,7 +22,7 @@ class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/status.cc b/src/actions/status.cc index 92d42bbe..97e7b273 100644 --- a/src/actions/status.cc +++ b/src/actions/status.cc @@ -20,7 +20,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { Status::Status(std::string action) diff --git a/src/actions/status.h b/src/actions/status.h index aab8d0b2..8c5f7a6e 100644 --- a/src/actions/status.h +++ b/src/actions/status.h @@ -23,7 +23,7 @@ #ifdef __cplusplus class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/tag.cc b/src/actions/tag.cc index cf7b9026..40d2d081 100644 --- a/src/actions/tag.cc +++ b/src/actions/tag.cc @@ -23,7 +23,7 @@ #include "src/utils.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { Tag::Tag(std::string action) diff --git a/src/actions/tag.h b/src/actions/tag.h index f8dcde20..b1773a9b 100644 --- a/src/actions/tag.h +++ b/src/actions/tag.h @@ -22,7 +22,7 @@ class Assay; -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/base64_decode.cc b/src/actions/transformations/base64_decode.cc index f06285f1..166e2674 100644 --- a/src/actions/transformations/base64_decode.cc +++ b/src/actions/transformations/base64_decode.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/base64_decode.h b/src/actions/transformations/base64_decode.h index 417a3776..ca829b81 100644 --- a/src/actions/transformations/base64_decode.h +++ b/src/actions/transformations/base64_decode.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/base64_decode_ext.cc b/src/actions/transformations/base64_decode_ext.cc index 24a9efc6..82ac1bf3 100644 --- a/src/actions/transformations/base64_decode_ext.cc +++ b/src/actions/transformations/base64_decode_ext.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/base64_decode_ext.h b/src/actions/transformations/base64_decode_ext.h index b65927da..7c9ff0e3 100644 --- a/src/actions/transformations/base64_decode_ext.h +++ b/src/actions/transformations/base64_decode_ext.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_BASE64_DECODE_EXT_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/cmd_line.cc b/src/actions/transformations/cmd_line.cc index fcb8f533..3e3008b8 100644 --- a/src/actions/transformations/cmd_line.cc +++ b/src/actions/transformations/cmd_line.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/cmd_line.h b/src/actions/transformations/cmd_line.h index dd45135c..aa3fa730 100644 --- a/src/actions/transformations/cmd_line.h +++ b/src/actions/transformations/cmd_line.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_CMD_LINE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/compress_whitespace.cc b/src/actions/transformations/compress_whitespace.cc index a971cdfd..bf64705a 100644 --- a/src/actions/transformations/compress_whitespace.cc +++ b/src/actions/transformations/compress_whitespace.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/compress_whitespace.h b/src/actions/transformations/compress_whitespace.h index 3c9164c3..4817cb3b 100644 --- a/src/actions/transformations/compress_whitespace.h +++ b/src/actions/transformations/compress_whitespace.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_COMPRESS_WHITESPACE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/css_decode.cc b/src/actions/transformations/css_decode.cc index b75ee1e2..e4f014fb 100644 --- a/src/actions/transformations/css_decode.cc +++ b/src/actions/transformations/css_decode.cc @@ -29,7 +29,7 @@ #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/css_decode.h b/src/actions/transformations/css_decode.h index 7f7280be..2272aabc 100644 --- a/src/actions/transformations/css_decode.h +++ b/src/actions/transformations/css_decode.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_CSS_DECODE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/escape_seq_decode.cc b/src/actions/transformations/escape_seq_decode.cc index eb7530db..92744002 100644 --- a/src/actions/transformations/escape_seq_decode.cc +++ b/src/actions/transformations/escape_seq_decode.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/escape_seq_decode.h b/src/actions/transformations/escape_seq_decode.h index 68acacd9..a44f75d3 100644 --- a/src/actions/transformations/escape_seq_decode.h +++ b/src/actions/transformations/escape_seq_decode.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_ESCAPE_SEQ_DECODE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/hex_decode.cc b/src/actions/transformations/hex_decode.cc index dd21ca7c..17fd31b2 100644 --- a/src/actions/transformations/hex_decode.cc +++ b/src/actions/transformations/hex_decode.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/hex_decode.h b/src/actions/transformations/hex_decode.h index b6ac53ea..b454b808 100644 --- a/src/actions/transformations/hex_decode.h +++ b/src/actions/transformations/hex_decode.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_HEX_DECODE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/hex_encode.cc b/src/actions/transformations/hex_encode.cc index e4b87942..ad6e19c3 100644 --- a/src/actions/transformations/hex_encode.cc +++ b/src/actions/transformations/hex_encode.cc @@ -27,7 +27,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/hex_encode.h b/src/actions/transformations/hex_encode.h index 6a8daefa..e7321d15 100644 --- a/src/actions/transformations/hex_encode.h +++ b/src/actions/transformations/hex_encode.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_HEX_ENCODE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/html_entity_decode.cc b/src/actions/transformations/html_entity_decode.cc index 38351679..aae9e1e8 100644 --- a/src/actions/transformations/html_entity_decode.cc +++ b/src/actions/transformations/html_entity_decode.cc @@ -29,7 +29,7 @@ #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/html_entity_decode.h b/src/actions/transformations/html_entity_decode.h index 7deb20d9..484c4e19 100644 --- a/src/actions/transformations/html_entity_decode.h +++ b/src/actions/transformations/html_entity_decode.h @@ -23,7 +23,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_HTML_ENTITY_DECODE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/js_decode.cc b/src/actions/transformations/js_decode.cc index d26b1e6c..c7f88dff 100644 --- a/src/actions/transformations/js_decode.cc +++ b/src/actions/transformations/js_decode.cc @@ -29,7 +29,7 @@ #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/js_decode.h b/src/actions/transformations/js_decode.h index 34e08ea6..335b9a03 100644 --- a/src/actions/transformations/js_decode.h +++ b/src/actions/transformations/js_decode.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_JS_DECODE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/length.cc b/src/actions/transformations/length.cc index dc1d61ea..ef9ad8e7 100644 --- a/src/actions/transformations/length.cc +++ b/src/actions/transformations/length.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/length.h b/src/actions/transformations/length.h index 862032ce..7a16d144 100644 --- a/src/actions/transformations/length.h +++ b/src/actions/transformations/length.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_LENGTH_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/lower_case.cc b/src/actions/transformations/lower_case.cc index 6f523670..c0c04cab 100644 --- a/src/actions/transformations/lower_case.cc +++ b/src/actions/transformations/lower_case.cc @@ -22,7 +22,7 @@ #include "actions/transformations/transformation.h" #include "actions/action.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/lower_case.h b/src/actions/transformations/lower_case.h index 6e85d34b..94b0b9e4 100644 --- a/src/actions/transformations/lower_case.h +++ b/src/actions/transformations/lower_case.h @@ -24,7 +24,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { namespace transformations { diff --git a/src/actions/transformations/md5.cc b/src/actions/transformations/md5.cc index 4a8feb8e..bd7e8743 100644 --- a/src/actions/transformations/md5.cc +++ b/src/actions/transformations/md5.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/md5.h b/src/actions/transformations/md5.h index da0976fc..7a91c54d 100644 --- a/src/actions/transformations/md5.h +++ b/src/actions/transformations/md5.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_MD5_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/none.cc b/src/actions/transformations/none.cc index 2935ef8b..741ef783 100644 --- a/src/actions/transformations/none.cc +++ b/src/actions/transformations/none.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/none.h b/src/actions/transformations/none.h index 75deb678..4cd0271f 100644 --- a/src/actions/transformations/none.h +++ b/src/actions/transformations/none.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_NONE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/normalise_path.cc b/src/actions/transformations/normalise_path.cc index 2b81356a..c2be630d 100644 --- a/src/actions/transformations/normalise_path.cc +++ b/src/actions/transformations/normalise_path.cc @@ -29,7 +29,7 @@ #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/normalise_path.h b/src/actions/transformations/normalise_path.h index 38687753..f85678cd 100644 --- a/src/actions/transformations/normalise_path.h +++ b/src/actions/transformations/normalise_path.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_NORMALISE_PATH_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/normalise_path_win.cc b/src/actions/transformations/normalise_path_win.cc index 15b35a86..14f2a28f 100644 --- a/src/actions/transformations/normalise_path_win.cc +++ b/src/actions/transformations/normalise_path_win.cc @@ -29,7 +29,7 @@ #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/normalise_path_win.h b/src/actions/transformations/normalise_path_win.h index 4e117e63..ed33b6d9 100644 --- a/src/actions/transformations/normalise_path_win.h +++ b/src/actions/transformations/normalise_path_win.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_NORMALISE_PATH_WIN_H_ -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/parity_even_7bit.cc b/src/actions/transformations/parity_even_7bit.cc index 770c4eaf..0e8c4dd1 100644 --- a/src/actions/transformations/parity_even_7bit.cc +++ b/src/actions/transformations/parity_even_7bit.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/parity_even_7bit.h b/src/actions/transformations/parity_even_7bit.h index 08c3ad82..6b6c14bc 100644 --- a/src/actions/transformations/parity_even_7bit.h +++ b/src/actions/transformations/parity_even_7bit.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_PARITY_EVEN_7BIT_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/parity_odd_7bit.cc b/src/actions/transformations/parity_odd_7bit.cc index de272cbf..4c1bc8a7 100644 --- a/src/actions/transformations/parity_odd_7bit.cc +++ b/src/actions/transformations/parity_odd_7bit.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/parity_odd_7bit.h b/src/actions/transformations/parity_odd_7bit.h index 6599c839..0d6da16b 100644 --- a/src/actions/transformations/parity_odd_7bit.h +++ b/src/actions/transformations/parity_odd_7bit.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_PARITY_ODD_7BIT_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/parity_zero_7bit.cc b/src/actions/transformations/parity_zero_7bit.cc index d2d826eb..6cd0a8bc 100644 --- a/src/actions/transformations/parity_zero_7bit.cc +++ b/src/actions/transformations/parity_zero_7bit.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/parity_zero_7bit.h b/src/actions/transformations/parity_zero_7bit.h index bf00e3c9..beab79ea 100644 --- a/src/actions/transformations/parity_zero_7bit.h +++ b/src/actions/transformations/parity_zero_7bit.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_PARITY_ZERO_7BIT_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/remove_comments.cc b/src/actions/transformations/remove_comments.cc index 7b3e69d9..5cfc1f56 100644 --- a/src/actions/transformations/remove_comments.cc +++ b/src/actions/transformations/remove_comments.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/remove_comments.h b/src/actions/transformations/remove_comments.h index 48c7a41e..e085ddf2 100644 --- a/src/actions/transformations/remove_comments.h +++ b/src/actions/transformations/remove_comments.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_REMOVE_COMMENTS_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/remove_comments_char.cc b/src/actions/transformations/remove_comments_char.cc index baba9a7b..01612b5d 100644 --- a/src/actions/transformations/remove_comments_char.cc +++ b/src/actions/transformations/remove_comments_char.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/remove_comments_char.h b/src/actions/transformations/remove_comments_char.h index d6832d1f..cdcf1a62 100644 --- a/src/actions/transformations/remove_comments_char.h +++ b/src/actions/transformations/remove_comments_char.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_REMOVE_COMMENTS_CHAR_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/remove_nulls.cc b/src/actions/transformations/remove_nulls.cc index 01c2d94c..2ef2180b 100644 --- a/src/actions/transformations/remove_nulls.cc +++ b/src/actions/transformations/remove_nulls.cc @@ -28,7 +28,7 @@ #include "actions/transformations/transformation.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/remove_nulls.h b/src/actions/transformations/remove_nulls.h index e4ae65b5..5a00eed3 100644 --- a/src/actions/transformations/remove_nulls.h +++ b/src/actions/transformations/remove_nulls.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_REMOVE_NULLS_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/remove_whitespace.cc b/src/actions/transformations/remove_whitespace.cc index c8c3f6ba..3e03e046 100644 --- a/src/actions/transformations/remove_whitespace.cc +++ b/src/actions/transformations/remove_whitespace.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/remove_whitespace.h b/src/actions/transformations/remove_whitespace.h index 46c74a13..36f064d3 100644 --- a/src/actions/transformations/remove_whitespace.h +++ b/src/actions/transformations/remove_whitespace.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_REMOVE_WHITESPACE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/replace_comments.cc b/src/actions/transformations/replace_comments.cc index 29235052..75a34960 100644 --- a/src/actions/transformations/replace_comments.cc +++ b/src/actions/transformations/replace_comments.cc @@ -27,7 +27,7 @@ #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/replace_comments.h b/src/actions/transformations/replace_comments.h index f76c39b1..e0ece07d 100644 --- a/src/actions/transformations/replace_comments.h +++ b/src/actions/transformations/replace_comments.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_REPLACE_COMMENTS_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/replace_nulls.cc b/src/actions/transformations/replace_nulls.cc index c3daca50..f3bf397a 100644 --- a/src/actions/transformations/replace_nulls.cc +++ b/src/actions/transformations/replace_nulls.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/replace_nulls.h b/src/actions/transformations/replace_nulls.h index 1b3d34d6..0d254bf9 100644 --- a/src/actions/transformations/replace_nulls.h +++ b/src/actions/transformations/replace_nulls.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_REPLACE_NULLS_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/sha1.cc b/src/actions/transformations/sha1.cc index 04d49d4d..76a3de4d 100644 --- a/src/actions/transformations/sha1.cc +++ b/src/actions/transformations/sha1.cc @@ -28,7 +28,7 @@ #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/sha1.h b/src/actions/transformations/sha1.h index f24d2a90..c28c33de 100644 --- a/src/actions/transformations/sha1.h +++ b/src/actions/transformations/sha1.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_SHA1_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/sql_hex_decode.cc b/src/actions/transformations/sql_hex_decode.cc index a043531a..a9c54107 100644 --- a/src/actions/transformations/sql_hex_decode.cc +++ b/src/actions/transformations/sql_hex_decode.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/sql_hex_decode.h b/src/actions/transformations/sql_hex_decode.h index 8d8ada7c..e724eab8 100644 --- a/src/actions/transformations/sql_hex_decode.h +++ b/src/actions/transformations/sql_hex_decode.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_SQL_HEX_DECODE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/transformation.cc b/src/actions/transformations/transformation.cc index 86753fad..cfb107da 100644 --- a/src/actions/transformations/transformation.cc +++ b/src/actions/transformations/transformation.cc @@ -61,7 +61,7 @@ if (a.compare(2, std::strlen(#b), #b) == 0) -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/transformation.h b/src/actions/transformations/transformation.h index f9d9ef24..810cd1f3 100644 --- a/src/actions/transformations/transformation.h +++ b/src/actions/transformations/transformation.h @@ -22,7 +22,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/trim.cc b/src/actions/transformations/trim.cc index be59eefa..5026dbc1 100644 --- a/src/actions/transformations/trim.cc +++ b/src/actions/transformations/trim.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" #include "actions/action.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/trim.h b/src/actions/transformations/trim.h index b44a2cd5..d0049731 100644 --- a/src/actions/transformations/trim.h +++ b/src/actions/transformations/trim.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_TRIM_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/trim_left.cc b/src/actions/transformations/trim_left.cc index 90f33019..0e5221f7 100644 --- a/src/actions/transformations/trim_left.cc +++ b/src/actions/transformations/trim_left.cc @@ -27,7 +27,7 @@ #include "actions/transformations/trim.h" #include "actions/action.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/trim_left.h b/src/actions/transformations/trim_left.h index c6e48502..33fd8865 100644 --- a/src/actions/transformations/trim_left.h +++ b/src/actions/transformations/trim_left.h @@ -23,7 +23,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_TRIM_LEFT_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/trim_right.cc b/src/actions/transformations/trim_right.cc index 4ce6c7ed..3d5952eb 100644 --- a/src/actions/transformations/trim_right.cc +++ b/src/actions/transformations/trim_right.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" #include "actions/action.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/trim_right.h b/src/actions/transformations/trim_right.h index 497241d6..712e1601 100644 --- a/src/actions/transformations/trim_right.h +++ b/src/actions/transformations/trim_right.h @@ -23,7 +23,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_TRIM_RIGHT_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/url_decode.cc b/src/actions/transformations/url_decode.cc index e901c597..cd1628c6 100644 --- a/src/actions/transformations/url_decode.cc +++ b/src/actions/transformations/url_decode.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/url_decode.h b/src/actions/transformations/url_decode.h index 5cc8b630..ac11d2a3 100644 --- a/src/actions/transformations/url_decode.h +++ b/src/actions/transformations/url_decode.h @@ -23,7 +23,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_URL_DECODE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/url_decode_uni.cc b/src/actions/transformations/url_decode_uni.cc index 7139de6a..d86642d7 100644 --- a/src/actions/transformations/url_decode_uni.cc +++ b/src/actions/transformations/url_decode_uni.cc @@ -29,7 +29,7 @@ #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/url_decode_uni.h b/src/actions/transformations/url_decode_uni.h index 847e27ce..4e1ec42e 100644 --- a/src/actions/transformations/url_decode_uni.h +++ b/src/actions/transformations/url_decode_uni.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_URL_DECODE_UNI_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/url_encode.cc b/src/actions/transformations/url_encode.cc index 5756255c..c22dde92 100644 --- a/src/actions/transformations/url_encode.cc +++ b/src/actions/transformations/url_encode.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/url_encode.h b/src/actions/transformations/url_encode.h index eee911b1..646152bb 100644 --- a/src/actions/transformations/url_encode.h +++ b/src/actions/transformations/url_encode.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_URL_ENCODE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/actions/transformations/utf8_to_unicode.cc b/src/actions/transformations/utf8_to_unicode.cc index c59e2916..4f669c67 100644 --- a/src/actions/transformations/utf8_to_unicode.cc +++ b/src/actions/transformations/utf8_to_unicode.cc @@ -26,7 +26,7 @@ #include "actions/transformations/transformation.h" -namespace ModSecurity { +namespace modsecurity { namespace actions { namespace transformations { diff --git a/src/actions/transformations/utf8_to_unicode.h b/src/actions/transformations/utf8_to_unicode.h index dc58d4b3..aeef0483 100644 --- a/src/actions/transformations/utf8_to_unicode.h +++ b/src/actions/transformations/utf8_to_unicode.h @@ -22,7 +22,7 @@ #define SRC_ACTIONS_TRANSFORMATIONS_UTF8_TO_UNICODE_H_ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Assay; namespace actions { diff --git a/src/assay.cc b/src/assay.cc index e7026bd1..f19fa01c 100644 --- a/src/assay.cc +++ b/src/assay.cc @@ -40,10 +40,10 @@ #include "src/unique_id.h" #include "request_body_processor/multipart.h" -using ModSecurity::actions::Action; -using ModSecurity::RequestBodyProcessor::Multipart; +using modsecurity::actions::Action; +using modsecurity::RequestBodyProcessor::Multipart; -namespace ModSecurity { +namespace modsecurity { /** * @name Assay @@ -1442,7 +1442,7 @@ std::string Assay::to_json(int parts) { yajl_gen_map_open(g); /* producer > libmodsecurity */ - LOGFY_ADD("modsecurity", ModSecurity::whoAmI().c_str()); + LOGFY_ADD("modsecurity", modsecurity::whoAmI().c_str()); /* producer > connector */ LOGFY_ADD("connector", m_ms->getConnectorInformation().c_str()); diff --git a/src/audit_log.cc b/src/audit_log.cc index 4d645545..9acfd3c8 100644 --- a/src/audit_log.cc +++ b/src/audit_log.cc @@ -37,7 +37,7 @@ parts = parts & ~c; \ } -namespace ModSecurity { +namespace modsecurity { AuditLog::AuditLog() : m_status(OffAuditLogStatus), diff --git a/src/audit_log.h b/src/audit_log.h index 20b96255..222c2f8b 100644 --- a/src/audit_log.h +++ b/src/audit_log.h @@ -27,7 +27,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { /** @ingroup ModSecurity_CPP_API */ class AuditLog { diff --git a/src/audit_log_writer.cc b/src/audit_log_writer.cc index 8b2173c4..5f026727 100644 --- a/src/audit_log_writer.cc +++ b/src/audit_log_writer.cc @@ -19,7 +19,7 @@ #include "src/audit_log.h" -namespace ModSecurity { +namespace modsecurity { std::string AuditLogWriter::file_name(const std::string& unique_id) { time_t timer; diff --git a/src/audit_log_writer.h b/src/audit_log_writer.h index 010a3f97..2f4623d4 100644 --- a/src/audit_log_writer.h +++ b/src/audit_log_writer.h @@ -25,7 +25,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class AuditLog; /** @ingroup ModSecurity_CPP_API */ diff --git a/src/audit_log_writer_parallel.cc b/src/audit_log_writer_parallel.cc index b0b796b5..a7ccda6c 100644 --- a/src/audit_log_writer_parallel.cc +++ b/src/audit_log_writer_parallel.cc @@ -29,7 +29,7 @@ #include "src/utils.h" #include "utils/md5.h" -namespace ModSecurity { +namespace modsecurity { AuditLogWriterParallel::~AuditLogWriterParallel() { diff --git a/src/audit_log_writer_parallel.h b/src/audit_log_writer_parallel.h index b73a22d0..92d02d27 100644 --- a/src/audit_log_writer_parallel.h +++ b/src/audit_log_writer_parallel.h @@ -23,7 +23,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { /** @ingroup ModSecurity_CPP_API */ class AuditLogWriterParallel : public AuditLogWriter { diff --git a/src/audit_log_writer_serial.cc b/src/audit_log_writer_serial.cc index 2325a859..7b243262 100644 --- a/src/audit_log_writer_serial.cc +++ b/src/audit_log_writer_serial.cc @@ -19,7 +19,7 @@ #include "src/audit_log.h" -namespace ModSecurity { +namespace modsecurity { // static std::mutex serialLoggingMutex; diff --git a/src/audit_log_writer_serial.h b/src/audit_log_writer_serial.h index bf0a3743..ee009c85 100644 --- a/src/audit_log_writer_serial.h +++ b/src/audit_log_writer_serial.h @@ -27,7 +27,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { #define SERIAL_AUDIT_LOG_BOUNDARY_LENGTH 8 diff --git a/src/collections.cc b/src/collections.cc index b35a2b00..0884b246 100644 --- a/src/collections.cc +++ b/src/collections.cc @@ -27,7 +27,7 @@ #include "modsecurity/transaction/variable.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace transaction { diff --git a/src/debug_log.cc b/src/debug_log.cc index 26c6da1c..161202c4 100644 --- a/src/debug_log.cc +++ b/src/debug_log.cc @@ -23,7 +23,7 @@ #include "src/debug_log_writer_agent.h" -namespace ModSecurity { +namespace modsecurity { DebugLog::~DebugLog() { DebugLogWriter::getInstance().close(m_fileName); diff --git a/src/debug_log_writer.cc b/src/debug_log_writer.cc index 445829fe..d40a4aa3 100644 --- a/src/debug_log_writer.cc +++ b/src/debug_log_writer.cc @@ -21,7 +21,7 @@ #include "src/debug_log_writer_agent.h" -namespace ModSecurity { +namespace modsecurity { void DebugLogWriter::open(const std::string& fileName) { diff --git a/src/debug_log_writer.h b/src/debug_log_writer.h index 8f2076ae..536fa7fe 100644 --- a/src/debug_log_writer.h +++ b/src/debug_log_writer.h @@ -23,7 +23,7 @@ #include "src/debug_log_writer_agent.h" -namespace ModSecurity { +namespace modsecurity { /** @ingroup ModSecurity_CPP_API */ class DebugLogWriter { diff --git a/src/debug_log_writer_agent.cc b/src/debug_log_writer_agent.cc index 9d617cf4..7b1d9712 100644 --- a/src/debug_log_writer_agent.cc +++ b/src/debug_log_writer_agent.cc @@ -22,7 +22,7 @@ #include "src/debug_log_writer.h" -namespace ModSecurity { +namespace modsecurity { DebugLogWriterAgent::DebugLogWriterAgent(const std::string& fileName) : diff --git a/src/debug_log_writer_agent.h b/src/debug_log_writer_agent.h index 6b5b3a11..c5b4e015 100644 --- a/src/debug_log_writer_agent.h +++ b/src/debug_log_writer_agent.h @@ -20,7 +20,7 @@ #ifndef SRC_DEBUG_LOG_WRITER_AGENT_H_ #define SRC_DEBUG_LOG_WRITER_AGENT_H_ -namespace ModSecurity { +namespace modsecurity { /** @ingroup ModSecurity_CPP_API */ class DebugLogWriterAgent : public std::ofstream { diff --git a/src/macro_expansion.cc b/src/macro_expansion.cc index 40b8feb8..56061b80 100644 --- a/src/macro_expansion.cc +++ b/src/macro_expansion.cc @@ -16,7 +16,7 @@ #include "src/macro_expansion.h" #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { MacroExpansion::MacroExpansion() { } diff --git a/src/macro_expansion.h b/src/macro_expansion.h index b6f706cb..fe1b0427 100644 --- a/src/macro_expansion.h +++ b/src/macro_expansion.h @@ -24,7 +24,7 @@ #ifndef SRC_MACRO_EXPANSION_H_ #define SRC_MACRO_EXPANSION_H_ -namespace ModSecurity { +namespace modsecurity { class MacroExpansion { diff --git a/src/modsecurity.cc b/src/modsecurity.cc index f0e97ce9..a12b44e1 100644 --- a/src/modsecurity.cc +++ b/src/modsecurity.cc @@ -26,7 +26,7 @@ #include "utils/geo_lookup.h" -namespace ModSecurity { +namespace modsecurity { /** * @name ModSecurity diff --git a/src/operators/begins_with.cc b/src/operators/begins_with.cc index b53fce8a..629c1f7d 100644 --- a/src/operators/begins_with.cc +++ b/src/operators/begins_with.cc @@ -20,7 +20,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/begins_with.h b/src/operators/begins_with.h index a69aecf5..b1abfc9d 100644 --- a/src/operators/begins_with.h +++ b/src/operators/begins_with.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class BeginsWith : public Operator { diff --git a/src/operators/contains.cc b/src/operators/contains.cc index ea783b67..b9dc1d1c 100644 --- a/src/operators/contains.cc +++ b/src/operators/contains.cc @@ -19,7 +19,7 @@ #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool Contains::evaluate(Assay *assay, const std::string &input) { diff --git a/src/operators/contains.h b/src/operators/contains.h index b97ce48d..1950ebd1 100644 --- a/src/operators/contains.h +++ b/src/operators/contains.h @@ -23,7 +23,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class Contains : public Operator { diff --git a/src/operators/contains_word.cc b/src/operators/contains_word.cc index 1988f4df..6be579f3 100644 --- a/src/operators/contains_word.cc +++ b/src/operators/contains_word.cc @@ -20,7 +20,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool ContainsWord::acceptableChar(const std::string& a, size_t pos) { diff --git a/src/operators/contains_word.h b/src/operators/contains_word.h index d615fd4a..60da7dd0 100644 --- a/src/operators/contains_word.h +++ b/src/operators/contains_word.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class ContainsWord : public Operator { diff --git a/src/operators/detect_sqli.cc b/src/operators/detect_sqli.cc index a2994967..152e2699 100644 --- a/src/operators/detect_sqli.cc +++ b/src/operators/detect_sqli.cc @@ -21,7 +21,7 @@ #include "operators/operator.h" #include "others/libinjection/src/libinjection.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/detect_sqli.h b/src/operators/detect_sqli.h index c21d3569..a129017c 100644 --- a/src/operators/detect_sqli.h +++ b/src/operators/detect_sqli.h @@ -21,7 +21,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { class DetectSQLi : public Operator { diff --git a/src/operators/detect_xss.cc b/src/operators/detect_xss.cc index 7a202f4a..3bf3c69c 100644 --- a/src/operators/detect_xss.cc +++ b/src/operators/detect_xss.cc @@ -21,7 +21,7 @@ #include "others/libinjection/src/libinjection.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/detect_xss.h b/src/operators/detect_xss.h index 3a5c3cdb..2ab0ef7e 100644 --- a/src/operators/detect_xss.h +++ b/src/operators/detect_xss.h @@ -20,7 +20,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { class DetectXSS : public Operator { diff --git a/src/operators/ends_with.cc b/src/operators/ends_with.cc index 50f62d15..5eee4448 100644 --- a/src/operators/ends_with.cc +++ b/src/operators/ends_with.cc @@ -20,7 +20,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/ends_with.h b/src/operators/ends_with.h index 3d7d957f..a3908bd0 100644 --- a/src/operators/ends_with.h +++ b/src/operators/ends_with.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class EndsWith : public Operator { diff --git a/src/operators/eq.cc b/src/operators/eq.cc index 07c0f5fd..19421f10 100644 --- a/src/operators/eq.cc +++ b/src/operators/eq.cc @@ -20,7 +20,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/eq.h b/src/operators/eq.h index bb5f74a5..88a1baf3 100644 --- a/src/operators/eq.h +++ b/src/operators/eq.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class Eq : public Operator { diff --git a/src/operators/fuzzy_hash.cc b/src/operators/fuzzy_hash.cc index 70fb536f..83b59242 100644 --- a/src/operators/fuzzy_hash.cc +++ b/src/operators/fuzzy_hash.cc @@ -20,7 +20,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool FuzzyHash::evaluate(Assay *assay) { diff --git a/src/operators/fuzzy_hash.h b/src/operators/fuzzy_hash.h index 31246507..b83e4b11 100644 --- a/src/operators/fuzzy_hash.h +++ b/src/operators/fuzzy_hash.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class FuzzyHash : public Operator { diff --git a/src/operators/ge.cc b/src/operators/ge.cc index 6fa54fd2..93f2297e 100644 --- a/src/operators/ge.cc +++ b/src/operators/ge.cc @@ -20,7 +20,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool Ge::evaluate(Assay *assay, const std::string &input) { diff --git a/src/operators/ge.h b/src/operators/ge.h index a4571e65..e58a3b06 100644 --- a/src/operators/ge.h +++ b/src/operators/ge.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class Ge : public Operator { diff --git a/src/operators/geo_lookup.cc b/src/operators/geo_lookup.cc index 54f185a9..3b6ca2ef 100644 --- a/src/operators/geo_lookup.cc +++ b/src/operators/geo_lookup.cc @@ -26,7 +26,7 @@ #include "utils/geo_lookup.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/geo_lookup.h b/src/operators/geo_lookup.h index 9052dfdf..d4cf305e 100644 --- a/src/operators/geo_lookup.h +++ b/src/operators/geo_lookup.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class GeoLookup : public Operator { diff --git a/src/operators/gsblookup.cc b/src/operators/gsblookup.cc index 74e5354a..3d90cb93 100644 --- a/src/operators/gsblookup.cc +++ b/src/operators/gsblookup.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool GsbLookup::evaluate(Assay *assay) { diff --git a/src/operators/gsblookup.h b/src/operators/gsblookup.h index a6b51709..044426ec 100644 --- a/src/operators/gsblookup.h +++ b/src/operators/gsblookup.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class GsbLookup : public Operator { diff --git a/src/operators/gt.cc b/src/operators/gt.cc index eff4a03e..9ee64f7b 100644 --- a/src/operators/gt.cc +++ b/src/operators/gt.cc @@ -20,7 +20,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool Gt::evaluate(Assay *assay, const std::string &input) { diff --git a/src/operators/gt.h b/src/operators/gt.h index 3b2a3620..7eeb22cd 100644 --- a/src/operators/gt.h +++ b/src/operators/gt.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class Gt : public Operator { diff --git a/src/operators/inspect_file.cc b/src/operators/inspect_file.cc index 040ca216..73a23cda 100644 --- a/src/operators/inspect_file.cc +++ b/src/operators/inspect_file.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool InspectFile::evaluate(Assay *assay) { diff --git a/src/operators/inspect_file.h b/src/operators/inspect_file.h index b55a3b0b..422f670c 100644 --- a/src/operators/inspect_file.h +++ b/src/operators/inspect_file.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class InspectFile : public Operator { diff --git a/src/operators/ip_match.cc b/src/operators/ip_match.cc index b3b55d02..3d32402a 100644 --- a/src/operators/ip_match.cc +++ b/src/operators/ip_match.cc @@ -21,7 +21,7 @@ #include "utils/msc_tree.h" #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/ip_match.h b/src/operators/ip_match.h index 4413c473..4e871074 100644 --- a/src/operators/ip_match.h +++ b/src/operators/ip_match.h @@ -22,7 +22,7 @@ #include "utils/ip_tree.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class IpMatch : public Operator { diff --git a/src/operators/ip_match_f.cc b/src/operators/ip_match_f.cc index c2377746..05efdba0 100644 --- a/src/operators/ip_match_f.cc +++ b/src/operators/ip_match_f.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/ip_match_f.h b/src/operators/ip_match_f.h index ead427be..03fd24cb 100644 --- a/src/operators/ip_match_f.h +++ b/src/operators/ip_match_f.h @@ -21,7 +21,7 @@ #include "operators/ip_match_from_file.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class IpMatchF : public IpMatchFromFile { diff --git a/src/operators/ip_match_from_file.cc b/src/operators/ip_match_from_file.cc index 335f604c..56194abb 100644 --- a/src/operators/ip_match_from_file.cc +++ b/src/operators/ip_match_from_file.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/ip_match_from_file.h b/src/operators/ip_match_from_file.h index f73c43a0..10f134d9 100644 --- a/src/operators/ip_match_from_file.h +++ b/src/operators/ip_match_from_file.h @@ -20,7 +20,7 @@ #include "operators/ip_match.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class IpMatchFromFile : public IpMatch { diff --git a/src/operators/le.cc b/src/operators/le.cc index 39379471..682ab7fb 100644 --- a/src/operators/le.cc +++ b/src/operators/le.cc @@ -20,7 +20,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool Le::evaluate(Assay *assay, const std::string &input) { diff --git a/src/operators/le.h b/src/operators/le.h index 63d23011..decac3f4 100644 --- a/src/operators/le.h +++ b/src/operators/le.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class Le : public Operator { diff --git a/src/operators/lt.cc b/src/operators/lt.cc index 5eb86c80..3bd45323 100644 --- a/src/operators/lt.cc +++ b/src/operators/lt.cc @@ -20,7 +20,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool Lt::evaluate(Assay *assay, const std::string &input) { diff --git a/src/operators/lt.h b/src/operators/lt.h index 6da8c3d5..4bb1e088 100644 --- a/src/operators/lt.h +++ b/src/operators/lt.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class Lt : public Operator { diff --git a/src/operators/no_match.cc b/src/operators/no_match.cc index 1d36ecb6..834eca08 100644 --- a/src/operators/no_match.cc +++ b/src/operators/no_match.cc @@ -17,7 +17,7 @@ #include -namespace ModSecurity { +namespace modsecurity { namespace operators { bool NoMatch::evaluate(Assay *assay, const std::string &str) { diff --git a/src/operators/no_match.h b/src/operators/no_match.h index 2e5905b4..e5072c3f 100644 --- a/src/operators/no_match.h +++ b/src/operators/no_match.h @@ -23,7 +23,7 @@ #define SRC_OPERATORS_NO_MATCH_H_ -namespace ModSecurity { +namespace modsecurity { namespace operators { class NoMatch : public Operator { diff --git a/src/operators/operator.cc b/src/operators/operator.cc index 39083ff5..aef7b642 100644 --- a/src/operators/operator.cc +++ b/src/operators/operator.cc @@ -62,7 +62,7 @@ #define IF_MATCH(a) \ if (op_ == #a) -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/operator.h b/src/operators/operator.h index 2f10e9b2..9ac2fd01 100644 --- a/src/operators/operator.h +++ b/src/operators/operator.h @@ -23,7 +23,7 @@ #include "modsecurity/assay.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class Operator { diff --git a/src/operators/pm.cc b/src/operators/pm.cc index fe9eaba8..39a585f4 100644 --- a/src/operators/pm.cc +++ b/src/operators/pm.cc @@ -25,7 +25,7 @@ #include "operators/operator.h" #include "utils/acmp.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { Pm::~Pm() { diff --git a/src/operators/pm.h b/src/operators/pm.h index 95a14cec..dabe5b49 100644 --- a/src/operators/pm.h +++ b/src/operators/pm.h @@ -23,7 +23,7 @@ #include "utils/acmp.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/pm_f.cc b/src/operators/pm_f.cc index 760d6383..4cc80c8a 100644 --- a/src/operators/pm_f.cc +++ b/src/operators/pm_f.cc @@ -19,7 +19,7 @@ #include "operators/pm_from_file.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/pm_f.h b/src/operators/pm_f.h index 960b6c28..047661e5 100644 --- a/src/operators/pm_f.h +++ b/src/operators/pm_f.h @@ -21,7 +21,7 @@ #include "operators/pm_from_file.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/pm_from_file.cc b/src/operators/pm_from_file.cc index cf37901b..f0fcb24f 100644 --- a/src/operators/pm_from_file.cc +++ b/src/operators/pm_from_file.cc @@ -21,7 +21,7 @@ #include "utils/https_client.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/pm_from_file.h b/src/operators/pm_from_file.h index ce171f63..868b0aa4 100644 --- a/src/operators/pm_from_file.h +++ b/src/operators/pm_from_file.h @@ -21,7 +21,7 @@ #include "operators/pm.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/rbl.cc b/src/operators/rbl.cc index d96d18bf..957ac447 100644 --- a/src/operators/rbl.cc +++ b/src/operators/rbl.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool Rbl::evaluate(Assay *assay) { diff --git a/src/operators/rbl.h b/src/operators/rbl.h index 9a79edd5..9e325bb2 100644 --- a/src/operators/rbl.h +++ b/src/operators/rbl.h @@ -22,7 +22,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class Rbl : public Operator { diff --git a/src/operators/rsub.cc b/src/operators/rsub.cc index 6d0628c6..1450361c 100644 --- a/src/operators/rsub.cc +++ b/src/operators/rsub.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool Rsub::evaluate(Assay *assay) { diff --git a/src/operators/rsub.h b/src/operators/rsub.h index 403f990e..aaec361b 100644 --- a/src/operators/rsub.h +++ b/src/operators/rsub.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class Rsub : public Operator { diff --git a/src/operators/rx.cc b/src/operators/rx.cc index 710c8e37..c6b2d78f 100644 --- a/src/operators/rx.cc +++ b/src/operators/rx.cc @@ -21,7 +21,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/rx.h b/src/operators/rx.h index ded46f93..fd6f353a 100644 --- a/src/operators/rx.h +++ b/src/operators/rx.h @@ -23,7 +23,7 @@ #include "utils/regex.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { using Utils::SMatch; using Utils::regex_search; using Utils::Regex; diff --git a/src/operators/str_eq.cc b/src/operators/str_eq.cc index 84f93442..755c3da6 100644 --- a/src/operators/str_eq.cc +++ b/src/operators/str_eq.cc @@ -18,7 +18,7 @@ #include #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool StrEq::evaluate(Assay *assay, const std::string &str) { diff --git a/src/operators/str_eq.h b/src/operators/str_eq.h index b1fa5461..0bb3f7bb 100644 --- a/src/operators/str_eq.h +++ b/src/operators/str_eq.h @@ -24,7 +24,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class StrEq : public Operator { diff --git a/src/operators/str_match.cc b/src/operators/str_match.cc index ecbd0745..fd9644da 100644 --- a/src/operators/str_match.cc +++ b/src/operators/str_match.cc @@ -20,7 +20,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/str_match.h b/src/operators/str_match.h index f986e10a..3e4d38f6 100644 --- a/src/operators/str_match.h +++ b/src/operators/str_match.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class StrMatch : public Operator { diff --git a/src/operators/validate_byte_range.cc b/src/operators/validate_byte_range.cc index 54516196..9b9f0ce1 100644 --- a/src/operators/validate_byte_range.cc +++ b/src/operators/validate_byte_range.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool ValidateByteRange::getRange(const std::string &rangeRepresentation, diff --git a/src/operators/validate_byte_range.h b/src/operators/validate_byte_range.h index af274a1c..3449d300 100644 --- a/src/operators/validate_byte_range.h +++ b/src/operators/validate_byte_range.h @@ -23,7 +23,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class ValidateByteRange : public Operator { diff --git a/src/operators/validate_dtd.cc b/src/operators/validate_dtd.cc index 3f6d3789..238b5be5 100644 --- a/src/operators/validate_dtd.cc +++ b/src/operators/validate_dtd.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool ValidateDTD::evaluate(Assay *assay) { diff --git a/src/operators/validate_dtd.h b/src/operators/validate_dtd.h index 35430900..c11200b9 100644 --- a/src/operators/validate_dtd.h +++ b/src/operators/validate_dtd.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class ValidateDTD : public Operator { diff --git a/src/operators/validate_hash.cc b/src/operators/validate_hash.cc index ea20ba2c..6b7a62b1 100644 --- a/src/operators/validate_hash.cc +++ b/src/operators/validate_hash.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool ValidateHash::evaluate(Assay *assay) { diff --git a/src/operators/validate_hash.h b/src/operators/validate_hash.h index 0af6f36d..1227ccd6 100644 --- a/src/operators/validate_hash.h +++ b/src/operators/validate_hash.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class ValidateHash : public Operator { diff --git a/src/operators/validate_schema.cc b/src/operators/validate_schema.cc index 7a02c687..05bed4a7 100644 --- a/src/operators/validate_schema.cc +++ b/src/operators/validate_schema.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool ValidateSchema::evaluate(Assay *assay) { diff --git a/src/operators/validate_schema.h b/src/operators/validate_schema.h index 1cac38ee..4e599245 100644 --- a/src/operators/validate_schema.h +++ b/src/operators/validate_schema.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class ValidateSchema : public Operator { diff --git a/src/operators/validate_url_encoding.cc b/src/operators/validate_url_encoding.cc index 9801b6cf..96b521b9 100644 --- a/src/operators/validate_url_encoding.cc +++ b/src/operators/validate_url_encoding.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/validate_url_encoding.h b/src/operators/validate_url_encoding.h index 84ce3b73..d424cad0 100644 --- a/src/operators/validate_url_encoding.h +++ b/src/operators/validate_url_encoding.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class ValidateUrlEncoding : public Operator { diff --git a/src/operators/validate_utf8_encoding.cc b/src/operators/validate_utf8_encoding.cc index 2c2b0b34..2a8be204 100644 --- a/src/operators/validate_utf8_encoding.cc +++ b/src/operators/validate_utf8_encoding.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { int ValidateUtf8Encoding::detect_utf8_character( diff --git a/src/operators/validate_utf8_encoding.h b/src/operators/validate_utf8_encoding.h index 95019a88..fb17762c 100644 --- a/src/operators/validate_utf8_encoding.h +++ b/src/operators/validate_utf8_encoding.h @@ -28,7 +28,7 @@ #define UNICODE_ERROR_DECODING_ERROR -5 -namespace ModSecurity { +namespace modsecurity { namespace operators { class ValidateUtf8Encoding : public Operator { diff --git a/src/operators/verify_cc.cc b/src/operators/verify_cc.cc index 75c3883a..9c2889bf 100644 --- a/src/operators/verify_cc.cc +++ b/src/operators/verify_cc.cc @@ -23,7 +23,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/verify_cc.h b/src/operators/verify_cc.h index dae52a93..0f5f3850 100644 --- a/src/operators/verify_cc.h +++ b/src/operators/verify_cc.h @@ -21,7 +21,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { class VerifyCC : public Operator { diff --git a/src/operators/verify_cpf.cc b/src/operators/verify_cpf.cc index e2a0b4e1..97aec29a 100644 --- a/src/operators/verify_cpf.cc +++ b/src/operators/verify_cpf.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool VerifyCPF::evaluate(Assay *assay) { diff --git a/src/operators/verify_cpf.h b/src/operators/verify_cpf.h index 4cdb263f..92fb34e0 100644 --- a/src/operators/verify_cpf.h +++ b/src/operators/verify_cpf.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class VerifyCPF : public Operator { diff --git a/src/operators/verify_ssn.cc b/src/operators/verify_ssn.cc index 5404ab5a..f6adb027 100644 --- a/src/operators/verify_ssn.cc +++ b/src/operators/verify_ssn.cc @@ -19,7 +19,7 @@ #include "operators/operator.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { bool VerifySSN::evaluate(Assay *assay) { diff --git a/src/operators/verify_ssn.h b/src/operators/verify_ssn.h index c5d26ba2..e0bf7e80 100644 --- a/src/operators/verify_ssn.h +++ b/src/operators/verify_ssn.h @@ -22,7 +22,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class VerifySSN : public Operator { diff --git a/src/operators/within.cc b/src/operators/within.cc index 943f1416..d4c0fa98 100644 --- a/src/operators/within.cc +++ b/src/operators/within.cc @@ -20,7 +20,7 @@ #include "operators/operator.h" #include "src/macro_expansion.h" -namespace ModSecurity { +namespace modsecurity { namespace operators { diff --git a/src/operators/within.h b/src/operators/within.h index a76f438e..7f461bf1 100644 --- a/src/operators/within.h +++ b/src/operators/within.h @@ -21,7 +21,7 @@ #include "operators/operator.h" #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { namespace operators { class Within : public Operator { diff --git a/src/parser/driver.cc b/src/parser/driver.cc index b4db0800..21db5616 100644 --- a/src/parser/driver.cc +++ b/src/parser/driver.cc @@ -18,10 +18,10 @@ #include "parser/seclang-parser.hh" #include "src/audit_log.h" -using ModSecurity::AuditLog; -using ModSecurity::Rule; +using modsecurity::AuditLog; +using modsecurity::Rule; -namespace ModSecurity { +namespace modsecurity { namespace Parser { Driver::Driver() diff --git a/src/parser/driver.h b/src/parser/driver.h index 81a67c75..c675d6bb 100644 --- a/src/parser/driver.h +++ b/src/parser/driver.h @@ -31,16 +31,16 @@ #include "parser/seclang-parser.hh" -using ModSecurity::Rule; -using ModSecurity::Rules; +using modsecurity::Rule; +using modsecurity::Rules; # define YY_DECL \ - yy::seclang_parser::symbol_type yylex(ModSecurity::Parser::Driver& driver) + yy::seclang_parser::symbol_type yylex(modsecurity::Parser::Driver& driver) YY_DECL; -namespace ModSecurity { +namespace modsecurity { namespace Parser { #ifdef __cplusplus diff --git a/src/parser/seclang-parser.yy b/src/parser/seclang-parser.yy index 615fcf62..e436d2b8 100644 --- a/src/parser/seclang-parser.yy +++ b/src/parser/seclang-parser.yy @@ -4,7 +4,7 @@ %define parser_class_name {seclang_parser} %define api.token.constructor %define api.value.type variant -//%define api.namespace {ModSecurity::yy} +//%define api.namespace {modsecurity::yy} %define parse.assert %code requires { @@ -55,41 +55,41 @@ class Driver; #include "variables/time_year.h" #include "variables/tx.h" -using ModSecurity::ModSecurity; +using modsecurity::ModSecurity; -using ModSecurity::actions::Action; -using ModSecurity::actions::CtlAuditLogParts; -using ModSecurity::actions::SetVar; -using ModSecurity::actions::Severity; -using ModSecurity::actions::Tag; -using ModSecurity::actions::Redirect; -using ModSecurity::actions::Rev; -using ModSecurity::actions::Msg; -using ModSecurity::actions::Phase; -using ModSecurity::actions::transformations::None; -using ModSecurity::actions::LogData; -using ModSecurity::actions::transformations::Transformation; -using ModSecurity::operators::Operator; -using ModSecurity::Rule; -using ModSecurity::Utils::GeoLookup; +using modsecurity::actions::Action; +using modsecurity::actions::CtlAuditLogParts; +using modsecurity::actions::SetVar; +using modsecurity::actions::Severity; +using modsecurity::actions::Tag; +using modsecurity::actions::Redirect; +using modsecurity::actions::Rev; +using modsecurity::actions::Msg; +using modsecurity::actions::Phase; +using modsecurity::actions::transformations::None; +using modsecurity::actions::LogData; +using modsecurity::actions::transformations::Transformation; +using modsecurity::operators::Operator; +using modsecurity::Rule; +using modsecurity::Utils::GeoLookup; -using ModSecurity::Variables::Variations::Count; -using ModSecurity::Variables::Variations::Exclusion; -using ModSecurity::Variables::Duration; -using ModSecurity::Variables::Env; -using ModSecurity::Variables::HighestSeverity; -using ModSecurity::Variables::ModsecBuild; -using ModSecurity::Variables::Time; -using ModSecurity::Variables::TimeDay; -using ModSecurity::Variables::TimeEpoch; -using ModSecurity::Variables::TimeHour; -using ModSecurity::Variables::TimeMin; -using ModSecurity::Variables::TimeMon; -using ModSecurity::Variables::TimeSec; -using ModSecurity::Variables::TimeWDay; -using ModSecurity::Variables::TimeYear; -using ModSecurity::Variables::Variable; -using ModSecurity::Variables::Tx; +using modsecurity::Variables::Variations::Count; +using modsecurity::Variables::Variations::Exclusion; +using modsecurity::Variables::Duration; +using modsecurity::Variables::Env; +using modsecurity::Variables::HighestSeverity; +using modsecurity::Variables::ModsecBuild; +using modsecurity::Variables::Time; +using modsecurity::Variables::TimeDay; +using modsecurity::Variables::TimeEpoch; +using modsecurity::Variables::TimeHour; +using modsecurity::Variables::TimeMin; +using modsecurity::Variables::TimeMon; +using modsecurity::Variables::TimeSec; +using modsecurity::Variables::TimeWDay; +using modsecurity::Variables::TimeYear; +using modsecurity::Variables::Variable; +using modsecurity::Variables::Tx; #define CHECK_VARIATION_DECL \ @@ -125,7 +125,7 @@ using ModSecurity::Variables::Tx; } // The parsing context. -%param { ModSecurity::Parser::Driver& driver } +%param { modsecurity::Parser::Driver& driver } %locations %initial-action { @@ -285,15 +285,15 @@ audit_log: /* SecAuditEngine */ | CONFIG_DIR_AUDIT_ENG CONFIG_VALUE_RELEVANT_ONLY { - driver.audit_log->setStatus(ModSecurity::AuditLog::RelevantOnlyAuditLogStatus); + driver.audit_log->setStatus(modsecurity::AuditLog::RelevantOnlyAuditLogStatus); } | CONFIG_DIR_AUDIT_ENG CONFIG_VALUE_OFF { - driver.audit_log->setStatus(ModSecurity::AuditLog::OffAuditLogStatus); + driver.audit_log->setStatus(modsecurity::AuditLog::OffAuditLogStatus); } | CONFIG_DIR_AUDIT_ENG CONFIG_VALUE_ON { - driver.audit_log->setStatus(ModSecurity::AuditLog::OnAuditLogStatus); + driver.audit_log->setStatus(modsecurity::AuditLog::OnAuditLogStatus); } /* SecAuditLogFileMode */ @@ -332,11 +332,11 @@ audit_log: /* SecAuditLogType */ | CONFIG_DIR_AUDIT_TPE CONFIG_VALUE_SERIAL { - driver.audit_log->setType(ModSecurity::AuditLog::SerialAuditLogType); + driver.audit_log->setType(modsecurity::AuditLog::SerialAuditLogType); } | CONFIG_DIR_AUDIT_TPE CONFIG_VALUE_PARALLEL { - driver.audit_log->setType(ModSecurity::AuditLog::ParallelAuditLogType); + driver.audit_log->setType(modsecurity::AuditLog::ParallelAuditLogType); } ; @@ -457,7 +457,7 @@ expression: } } if (definedPhase == -1) { - definedPhase = ModSecurity::ModSecurity::Phases::RequestHeadersPhase; + definedPhase = modsecurity::ModSecurity::Phases::RequestHeadersPhase; } if (!driver.defaultActions[definedPhase].empty()) { @@ -481,15 +481,15 @@ expression: } | CONFIG_DIR_RULE_ENG CONFIG_VALUE_OFF { - driver.secRuleEngine = ModSecurity::Rules::DisabledRuleEngine; + driver.secRuleEngine = modsecurity::Rules::DisabledRuleEngine; } | CONFIG_DIR_RULE_ENG CONFIG_VALUE_ON { - driver.secRuleEngine = ModSecurity::Rules::EnabledRuleEngine; + driver.secRuleEngine = modsecurity::Rules::EnabledRuleEngine; } | CONFIG_DIR_RULE_ENG CONFIG_VALUE_DETC { - driver.secRuleEngine = ModSecurity::Rules::DetectionOnlyRuleEngine; + driver.secRuleEngine = modsecurity::Rules::DetectionOnlyRuleEngine; } | CONFIG_DIR_REQ_BODY CONFIG_VALUE_ON { @@ -540,7 +540,7 @@ expression: | CONFIG_DIR_GEO_DB { #ifdef WITH_GEOIP - std::string file = ModSecurity::find_resource($1, driver.ref.back()); + std::string file = modsecurity::find_resource($1, driver.ref.back()); if (GeoLookup::getInstance().setDataBase(file) == false) { std::stringstream ss; ss << "Failed to load the GeoDB from: "; @@ -574,19 +574,19 @@ expression: } | CONFIG_DIR_REQ_BODY_LIMIT_ACTION CONFIG_VALUE_PROCESS_PARTIAL { - driver.requestBodyLimitAction = ModSecurity::Rules::BodyLimitAction::ProcessPartialBodyLimitAction; + driver.requestBodyLimitAction = modsecurity::Rules::BodyLimitAction::ProcessPartialBodyLimitAction; } | CONFIG_DIR_REQ_BODY_LIMIT_ACTION CONFIG_VALUE_REJECT { - driver.requestBodyLimitAction = ModSecurity::Rules::BodyLimitAction::RejectBodyLimitAction; + driver.requestBodyLimitAction = modsecurity::Rules::BodyLimitAction::RejectBodyLimitAction; } | CONFIG_DIR_RES_BODY_LIMIT_ACTION CONFIG_VALUE_PROCESS_PARTIAL { - driver.responseBodyLimitAction = ModSecurity::Rules::BodyLimitAction::ProcessPartialBodyLimitAction; + driver.responseBodyLimitAction = modsecurity::Rules::BodyLimitAction::ProcessPartialBodyLimitAction; } | CONFIG_DIR_RES_BODY_LIMIT_ACTION CONFIG_VALUE_REJECT { - driver.responseBodyLimitAction = ModSecurity::Rules::BodyLimitAction::RejectBodyLimitAction; + driver.responseBodyLimitAction = modsecurity::Rules::BodyLimitAction::RejectBodyLimitAction; } | CONFIG_SEC_REMOTE_RULES_FAIL_ACTION CONFIG_VALUE_ABORT { @@ -830,11 +830,11 @@ act: } | ACTION_SKIP_AFTER { - $$ = new ModSecurity::actions::SkipAfter($1); + $$ = new modsecurity::actions::SkipAfter($1); } | ACTION_AUDIT_LOG { - $$ = new ModSecurity::actions::AuditLog($1); + $$ = new modsecurity::actions::AuditLog($1); } | LOG_DATA { diff --git a/src/parser/seclang-scanner.ll b/src/parser/seclang-scanner.ll index e18d26ac..a9a02b89 100755 --- a/src/parser/seclang-scanner.ll +++ b/src/parser/seclang-scanner.ll @@ -8,9 +8,9 @@ #include "utils/https_client.h" #include "utils.h" -using ModSecurity::Parser::Driver; -using ModSecurity::Utils::HttpsClient; -using ModSecurity::split; +using modsecurity::Parser::Driver; +using modsecurity::Utils::HttpsClient; +using modsecurity::split; // Work around an incompatibility in flex (at least versions // 2.5.31 through 2.5.33): it generates code that does @@ -386,8 +386,8 @@ CONFIG_DIR_UNICODE_MAP_FILE (?i:SecUnicodeMapFile) %{ /* Include external configurations */ %} {CONFIG_INCLUDE}[ ]{CONFIG_VALUE_PATH} { const char *file = strchr(yytext, ' ') + 1; - for (auto& s: ModSecurity::expandEnv(file, 0)) { - std::string f = ModSecurity::find_resource(s, driver.ref.back()); + for (auto& s: modsecurity::expandEnv(file, 0)) { + std::string f = modsecurity::find_resource(s, driver.ref.back()); yyin = fopen(f.c_str(), "r" ); if (!yyin) { BEGIN(INITIAL); @@ -404,8 +404,8 @@ CONFIG_DIR_UNICODE_MAP_FILE (?i:SecUnicodeMapFile) const char *file = strchr(yytext, ' ') + 1; char *f = strdup(file + 1); f[strlen(f)-1] = '\0'; - for (auto& s: ModSecurity::expandEnv(f, 0)) { - std::string f = ModSecurity::find_resource(s, driver.ref.back()); + for (auto& s: modsecurity::expandEnv(f, 0)) { + std::string f = modsecurity::find_resource(s, driver.ref.back()); yyin = fopen(f.c_str(), "r" ); if (!yyin) { BEGIN(INITIAL); @@ -456,7 +456,7 @@ CONFIG_DIR_UNICODE_MAP_FILE (?i:SecUnicodeMapFile) %% -namespace ModSecurity { +namespace modsecurity { bool Driver::scan_begin () { yy_flex_debug = trace_scanning; diff --git a/src/request_body_processor/multipart.cc b/src/request_body_processor/multipart.cc index a44edc1f..c355919c 100644 --- a/src/request_body_processor/multipart.cc +++ b/src/request_body_processor/multipart.cc @@ -21,7 +21,7 @@ #include "request_body_processor/multipart_blob.h" -namespace ModSecurity { +namespace modsecurity { namespace RequestBodyProcessor { Multipart::Multipart(std:: string header, Assay *assay) diff --git a/src/request_body_processor/multipart.h b/src/request_body_processor/multipart.h index 6a0bfd07..8863a5d4 100644 --- a/src/request_body_processor/multipart.h +++ b/src/request_body_processor/multipart.h @@ -22,7 +22,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace RequestBodyProcessor { class Multipart { diff --git a/src/request_body_processor/multipart_blob.cc b/src/request_body_processor/multipart_blob.cc index 3fef2193..a685a9b5 100644 --- a/src/request_body_processor/multipart_blob.cc +++ b/src/request_body_processor/multipart_blob.cc @@ -20,7 +20,7 @@ #include -namespace ModSecurity { +namespace modsecurity { namespace RequestBodyProcessor { MultipartBlob::MultipartBlob(const std::string &blob, Multipart *parent) diff --git a/src/request_body_processor/multipart_blob.h b/src/request_body_processor/multipart_blob.h index 636a990d..a86f67e4 100644 --- a/src/request_body_processor/multipart_blob.h +++ b/src/request_body_processor/multipart_blob.h @@ -21,7 +21,7 @@ #ifndef SRC_REQUEST_BODY_PROCESSOR_MULTIPART_BLOB_H_ #define SRC_REQUEST_BODY_PROCESSOR_MULTIPART_BLOB_H_ -namespace ModSecurity { +namespace modsecurity { namespace RequestBodyProcessor { class MultipartBlob { diff --git a/src/rule.cc b/src/rule.cc index 1b0da68f..62e8d45d 100644 --- a/src/rule.cc +++ b/src/rule.cc @@ -33,9 +33,9 @@ #include "modsecurity/rules.h" #include "src/macro_expansion.h" -using ModSecurity::Variables::Variations::Exclusion; +using modsecurity::Variables::Variations::Exclusion; -namespace ModSecurity { +namespace modsecurity { using operators::Operator; using actions::Action; diff --git a/src/rule.h b/src/rule.h index a7a305a0..31fc14d1 100644 --- a/src/rule.h +++ b/src/rule.h @@ -27,7 +27,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { class Rule { public: diff --git a/src/rules.cc b/src/rules.cc index 77bbcd21..91d69379 100644 --- a/src/rules.cc +++ b/src/rules.cc @@ -27,10 +27,10 @@ #include "parser/driver.h" #include "utils/https_client.h" -using ModSecurity::Parser::Driver; -using ModSecurity::Utils::HttpsClient; +using modsecurity::Parser::Driver; +using modsecurity::Utils::HttpsClient; -namespace ModSecurity { +namespace modsecurity { /** diff --git a/src/unique_id.cc b/src/unique_id.cc index 45ebec7d..8f8bd9cb 100644 --- a/src/unique_id.cc +++ b/src/unique_id.cc @@ -53,7 +53,7 @@ #include "src/utils/sha1.h" -namespace ModSecurity { +namespace modsecurity { void UniqueId::fillUniqueId() { std::string macAddress; diff --git a/src/unique_id.h b/src/unique_id.h index b4c15a42..36448cfd 100644 --- a/src/unique_id.h +++ b/src/unique_id.h @@ -23,7 +23,7 @@ #ifdef __cplusplus -namespace ModSecurity { +namespace modsecurity { #define MAC_ADDRESS_SIZE 19 #define MAX_MACHINE_NAME_SIZE 256 diff --git a/src/utils.cc b/src/utils.cc index ad857cf7..062ccd53 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -43,7 +43,7 @@ #include "modsecurity/modsecurity.h" -namespace ModSecurity { +namespace modsecurity { std::string phase_name(int x) { switch (x) { diff --git a/src/utils.h b/src/utils.h index f583bd62..228ec4c0 100644 --- a/src/utils.h +++ b/src/utils.h @@ -29,7 +29,7 @@ #define NBSP 160 -namespace ModSecurity { +namespace modsecurity { std::vector split(std::string str, char delimiter); double random_number(const double from, const double to); double generate_assay_unique_id(); diff --git a/src/utils/geo_lookup.cc b/src/utils/geo_lookup.cc index 1d4401c1..bb10f739 100644 --- a/src/utils/geo_lookup.cc +++ b/src/utils/geo_lookup.cc @@ -26,7 +26,7 @@ #include -namespace ModSecurity { +namespace modsecurity { namespace Utils { diff --git a/src/utils/geo_lookup.h b/src/utils/geo_lookup.h index 67f6f10a..37454d34 100644 --- a/src/utils/geo_lookup.h +++ b/src/utils/geo_lookup.h @@ -27,7 +27,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Utils { diff --git a/src/utils/https_client.cc b/src/utils/https_client.cc index 32ee523d..f0dbba08 100644 --- a/src/utils/https_client.cc +++ b/src/utils/https_client.cc @@ -32,7 +32,7 @@ #include "modsecurity/modsecurity.h" #include "src/unique_id.h" -namespace ModSecurity { +namespace modsecurity { namespace Utils { diff --git a/src/utils/https_client.h b/src/utils/https_client.h index 383e31ff..800d6b1b 100644 --- a/src/utils/https_client.h +++ b/src/utils/https_client.h @@ -29,7 +29,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Utils { diff --git a/src/utils/ip_tree.cc b/src/utils/ip_tree.cc index 7cec0925..6aa279f4 100644 --- a/src/utils/ip_tree.cc +++ b/src/utils/ip_tree.cc @@ -27,7 +27,7 @@ #include "utils/geo_lookup.h" #include "utils/https_client.h" -namespace ModSecurity { +namespace modsecurity { namespace Utils { void IpTree::postOrderTraversal(TreeNode *node) { diff --git a/src/utils/ip_tree.h b/src/utils/ip_tree.h index 5c17f8bc..ad6a9204 100644 --- a/src/utils/ip_tree.h +++ b/src/utils/ip_tree.h @@ -26,7 +26,7 @@ #include "modsecurity/assay.h" #include "utils/msc_tree.h" -namespace ModSecurity { +namespace modsecurity { namespace Utils { diff --git a/src/utils/regex.cc b/src/utils/regex.cc index e453b35e..fab0a507 100644 --- a/src/utils/regex.cc +++ b/src/utils/regex.cc @@ -27,7 +27,7 @@ #include "utils/geo_lookup.h" -namespace ModSecurity { +namespace modsecurity { namespace Utils { diff --git a/src/utils/regex.h b/src/utils/regex.h index 68348fca..8a0d5000 100644 --- a/src/utils/regex.h +++ b/src/utils/regex.h @@ -23,7 +23,7 @@ #define SRC_UTILS_REGEX_H_ -namespace ModSecurity { +namespace modsecurity { namespace Utils { #define OVECCOUNT 30 diff --git a/src/utils/sha1.cc b/src/utils/sha1.cc index 2badaf40..b006c37f 100644 --- a/src/utils/sha1.cc +++ b/src/utils/sha1.cc @@ -37,7 +37,7 @@ #include #include -namespace ModSecurity { +namespace modsecurity { namespace Utils { SHA1::SHA1() { diff --git a/src/utils/sha1.h b/src/utils/sha1.h index 5ac3a6e4..8171fdb1 100644 --- a/src/utils/sha1.h +++ b/src/utils/sha1.h @@ -38,7 +38,7 @@ #include #include -namespace ModSecurity { +namespace modsecurity { namespace Utils { class SHA1 { diff --git a/src/variables.cc b/src/variables.cc index c48e7916..32dd260a 100644 --- a/src/variables.cc +++ b/src/variables.cc @@ -26,7 +26,7 @@ #include "modsecurity/transaction/variable.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace transaction { diff --git a/src/variables/duration.cc b/src/variables/duration.cc index 8fd18cad..2df0fc4d 100644 --- a/src/variables/duration.cc +++ b/src/variables/duration.cc @@ -24,7 +24,7 @@ #include "modsecurity/assay.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void Duration::evaluateInternal(Assay *assay, diff --git a/src/variables/duration.h b/src/variables/duration.h index 7131a62b..a9891a88 100644 --- a/src/variables/duration.h +++ b/src/variables/duration.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/env.cc b/src/variables/env.cc index 5fc74762..5133b2be 100644 --- a/src/variables/env.cc +++ b/src/variables/env.cc @@ -30,7 +30,7 @@ extern char **environ; -namespace ModSecurity { +namespace modsecurity { namespace Variables { void Env::evaluateInternal(Assay *assay, diff --git a/src/variables/env.h b/src/variables/env.h index b08ee108..92745739 100644 --- a/src/variables/env.h +++ b/src/variables/env.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/highest_severity.cc b/src/variables/highest_severity.cc index 039f7d3d..355e45eb 100644 --- a/src/variables/highest_severity.cc +++ b/src/variables/highest_severity.cc @@ -23,7 +23,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void HighestSeverity::evaluateInternal(Assay *assay, diff --git a/src/variables/highest_severity.h b/src/variables/highest_severity.h index e0859eb7..34ce5132 100644 --- a/src/variables/highest_severity.h +++ b/src/variables/highest_severity.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/modsec_build.cc b/src/variables/modsec_build.cc index 179517d7..7369d13c 100644 --- a/src/variables/modsec_build.cc +++ b/src/variables/modsec_build.cc @@ -24,7 +24,7 @@ #include "modsecurity/assay.h" #include "modsecurity/modsecurity.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void ModsecBuild::evaluateInternal(Assay *assay, diff --git a/src/variables/modsec_build.h b/src/variables/modsec_build.h index 7851aefe..4e8a1c43 100644 --- a/src/variables/modsec_build.h +++ b/src/variables/modsec_build.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/time.cc b/src/variables/time.cc index b833dc38..c84869d9 100644 --- a/src/variables/time.cc +++ b/src/variables/time.cc @@ -30,7 +30,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void Time::evaluateInternal(Assay *assay, diff --git a/src/variables/time.h b/src/variables/time.h index ffa86e02..e86d1156 100644 --- a/src/variables/time.h +++ b/src/variables/time.h @@ -24,7 +24,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/time_day.cc b/src/variables/time_day.cc index 87c33e7b..dde93bcb 100644 --- a/src/variables/time_day.cc +++ b/src/variables/time_day.cc @@ -30,7 +30,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void TimeDay::evaluateInternal(Assay *assay, diff --git a/src/variables/time_day.h b/src/variables/time_day.h index fc698961..df47eca6 100644 --- a/src/variables/time_day.h +++ b/src/variables/time_day.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/time_epoch.cc b/src/variables/time_epoch.cc index 1160b72a..f3b0f626 100644 --- a/src/variables/time_epoch.cc +++ b/src/variables/time_epoch.cc @@ -30,7 +30,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void TimeEpoch::evaluateInternal(Assay *assay, diff --git a/src/variables/time_epoch.h b/src/variables/time_epoch.h index 503462d2..89b89f43 100644 --- a/src/variables/time_epoch.h +++ b/src/variables/time_epoch.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/time_hour.cc b/src/variables/time_hour.cc index 1c15ff8c..070ab17e 100644 --- a/src/variables/time_hour.cc +++ b/src/variables/time_hour.cc @@ -30,7 +30,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void TimeHour::evaluateInternal(Assay *assay, diff --git a/src/variables/time_hour.h b/src/variables/time_hour.h index cfea2c3c..285e8c4f 100644 --- a/src/variables/time_hour.h +++ b/src/variables/time_hour.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/time_min.cc b/src/variables/time_min.cc index bace4b1b..f04d175e 100644 --- a/src/variables/time_min.cc +++ b/src/variables/time_min.cc @@ -30,7 +30,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void TimeMin::evaluateInternal(Assay *assay, diff --git a/src/variables/time_min.h b/src/variables/time_min.h index 5dc28d74..9b116133 100644 --- a/src/variables/time_min.h +++ b/src/variables/time_min.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/time_mon.cc b/src/variables/time_mon.cc index 4e51cf22..193b30a0 100644 --- a/src/variables/time_mon.cc +++ b/src/variables/time_mon.cc @@ -30,7 +30,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void TimeMon::evaluateInternal(Assay *assay, diff --git a/src/variables/time_mon.h b/src/variables/time_mon.h index 5981eeac..b43e84d5 100644 --- a/src/variables/time_mon.h +++ b/src/variables/time_mon.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/time_sec.cc b/src/variables/time_sec.cc index 08caf139..402afe95 100644 --- a/src/variables/time_sec.cc +++ b/src/variables/time_sec.cc @@ -30,7 +30,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void TimeSec::evaluateInternal(Assay *assay, diff --git a/src/variables/time_sec.h b/src/variables/time_sec.h index 082a11eb..2dc3e658 100644 --- a/src/variables/time_sec.h +++ b/src/variables/time_sec.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/time_wday.cc b/src/variables/time_wday.cc index 1ff798e7..55e99d39 100644 --- a/src/variables/time_wday.cc +++ b/src/variables/time_wday.cc @@ -30,7 +30,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void TimeWDay::evaluateInternal(Assay *assay, diff --git a/src/variables/time_wday.h b/src/variables/time_wday.h index bab36e0d..a91077a5 100644 --- a/src/variables/time_wday.h +++ b/src/variables/time_wday.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/time_year.cc b/src/variables/time_year.cc index 0ad3424b..feba0ed3 100644 --- a/src/variables/time_year.cc +++ b/src/variables/time_year.cc @@ -30,7 +30,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { void TimeYear::evaluateInternal(Assay *assay, diff --git a/src/variables/time_year.h b/src/variables/time_year.h index 715bdf58..ea9d2ec7 100644 --- a/src/variables/time_year.h +++ b/src/variables/time_year.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/tx.cc b/src/variables/tx.cc index bc23ad29..ca35cb97 100644 --- a/src/variables/tx.cc +++ b/src/variables/tx.cc @@ -30,7 +30,7 @@ #include "modsecurity/assay.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { diff --git a/src/variables/tx.h b/src/variables/tx.h index 5802524d..30d6a454 100644 --- a/src/variables/tx.h +++ b/src/variables/tx.h @@ -24,7 +24,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/variable.cc b/src/variables/variable.cc index 92400a08..5b373640 100644 --- a/src/variables/variable.cc +++ b/src/variables/variable.cc @@ -23,9 +23,9 @@ #include "modsecurity/assay.h" #include "variations/exclusion.h" -using ModSecurity::Variables::Variations::Exclusion; +using modsecurity::Variables::Variations::Exclusion; -namespace ModSecurity { +namespace modsecurity { namespace Variables { diff --git a/src/variables/variable.h b/src/variables/variable.h index 5089f369..ab9dd8b2 100644 --- a/src/variables/variable.h +++ b/src/variables/variable.h @@ -22,7 +22,7 @@ #ifndef SRC_VARIABLES_VARIABLE_H_ #define SRC_VARIABLES_VARIABLE_H_ -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/variations/count.cc b/src/variables/variations/count.cc index 247c335a..8015a8e3 100644 --- a/src/variables/variations/count.cc +++ b/src/variables/variations/count.cc @@ -24,7 +24,7 @@ #include "modsecurity/assay.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { namespace Variations { diff --git a/src/variables/variations/count.h b/src/variables/variations/count.h index aa92a5cc..d2d20410 100644 --- a/src/variables/variations/count.h +++ b/src/variables/variations/count.h @@ -23,7 +23,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/src/variables/variations/exclusion.cc b/src/variables/variations/exclusion.cc index bae82a8f..bae08bda 100644 --- a/src/variables/variations/exclusion.cc +++ b/src/variables/variations/exclusion.cc @@ -24,7 +24,7 @@ #include "modsecurity/assay.h" #include "src/utils.h" -namespace ModSecurity { +namespace modsecurity { namespace Variables { namespace Variations { diff --git a/src/variables/variations/exclusion.h b/src/variables/variations/exclusion.h index 9b93abf6..702b1c88 100644 --- a/src/variables/variations/exclusion.h +++ b/src/variables/variations/exclusion.h @@ -24,7 +24,7 @@ #include "variables/variable.h" -namespace ModSecurity { +namespace modsecurity { class Assay; namespace Variables { diff --git a/test/benchmark/benchmark.cc b/test/benchmark/benchmark.cc index bf53671b..0466f1dd 100644 --- a/test/benchmark/benchmark.cc +++ b/test/benchmark/benchmark.cc @@ -22,7 +22,7 @@ #include "modsecurity/modsecurity.h" #include "modsecurity/rules.h" -using ModSecurity::Assay; +using modsecurity::Assay; char request_header[] = "" \ "GET /tutorials/other/top-20-mysql-best-practices/ HTTP/1.1\n\r" \ @@ -70,15 +70,15 @@ char rules_file[] = "basic_rules.conf"; int main(int argc, char *argv[]) { int i = 0; - ModSecurity::ModSecurity *modsec; - ModSecurity::Rules *rules; - ModSecurity::ModSecurityIntervention it; + modsecurity::ModSecurity *modsec; + modsecurity::Rules *rules; + modsecurity::ModSecurityIntervention it; - modsec = new ModSecurity::ModSecurity(); + modsec = new modsecurity::ModSecurity(); modsec->setConnectorInformation("ModSecurity-benchmark v0.0.1-alpha" \ " (ModSecurity benchmark utility)"); - rules = new ModSecurity::Rules(); + rules = new modsecurity::Rules(); if (rules->loadFromUri(rules_file) < 0) { std::cout << "Problems loading the rules..." << std::endl; std::cout << rules->parserError.str() << std::endl; diff --git a/test/optimization/optimization.cc b/test/optimization/optimization.cc index ef11882e..aa877acf 100644 --- a/test/optimization/optimization.cc +++ b/test/optimization/optimization.cc @@ -36,13 +36,13 @@ void print_help() { int main(int argc, char **argv) { - ModSecurity::Rules *modsecRules = new ModSecurity::Rules(); + modsecurity::Rules *modsecRules = new modsecurity::Rules(); std::vector files; int total = 0; int i = 1; while (i < argc) { - std::vector tfiles = ModSecurity::expandEnv(argv[i] , 0); + std::vector tfiles = modsecurity::expandEnv(argv[i] , 0); for (const auto &file : tfiles) { files.insert(files.begin(), file); } @@ -64,7 +64,7 @@ int main(int argc, char **argv) { std::cout << "Rules optimization" << std::endl; std::cout << std::endl; - int nphases = ModSecurity::ModSecurity::Phases::NUMBER_OF_PHASES; + int nphases = modsecurity::ModSecurity::Phases::NUMBER_OF_PHASES; for (int i = 0; i < nphases; i++) { std::vector rules = modsecRules->rules[i]; if (rules.size() == 0) { diff --git a/test/regression/custom_debug_log.cc b/test/regression/custom_debug_log.cc index 08909af4..a2170560 100644 --- a/test/regression/custom_debug_log.cc +++ b/test/regression/custom_debug_log.cc @@ -34,10 +34,10 @@ void CustomDebugLog::write(int level, const std::string& message) { bool CustomDebugLog::contains(const std::string& pattern) { - ModSecurity::Utils::Regex re(pattern); - ModSecurity::Utils::SMatch match; + modsecurity::Utils::Regex re(pattern); + modsecurity::Utils::SMatch match; std::string s = m_log.str(); - return ModSecurity::Utils::regex_search(s, re); + return modsecurity::Utils::regex_search(s, re); } std::string CustomDebugLog::log_messages() { diff --git a/test/regression/custom_debug_log.h b/test/regression/custom_debug_log.h index c7a8c404..898e2999 100644 --- a/test/regression/custom_debug_log.h +++ b/test/regression/custom_debug_log.h @@ -23,7 +23,7 @@ namespace modsecurity_test { -class CustomDebugLog : public ModSecurity::DebugLog { +class CustomDebugLog : public modsecurity::DebugLog { public: CustomDebugLog *new_instance(); diff --git a/test/regression/regression.cc b/test/regression/regression.cc index 5ef9450b..f93f3879 100644 --- a/test/regression/regression.cc +++ b/test/regression/regression.cc @@ -37,9 +37,9 @@ using modsecurity_test::ModSecurityTestResults; using modsecurity_test::RegressionTest; using modsecurity_test::RegressionTestResult; -using ModSecurity::Utils::regex_search; -using ModSecurity::Utils::SMatch; -using ModSecurity::Utils::Regex; +using modsecurity::Utils::regex_search; +using modsecurity::Utils::SMatch; +using modsecurity::Utils::Regex; std::string default_test_path = "test-cases/regression"; std::list resources; @@ -52,9 +52,9 @@ void print_help() { void actions(ModSecurityTestResults *r, - ModSecurity::Assay *a) { - ModSecurity::ModSecurityIntervention it; - memset(&it, '\0', sizeof(ModSecurity::ModSecurityIntervention)); + modsecurity::Assay *a) { + modsecurity::ModSecurityIntervention it; + memset(&it, '\0', sizeof(modsecurity::ModSecurityIntervention)); it.status = 200; if (a->intervention(&it) == true) { if (it.pause != 0) { @@ -81,9 +81,9 @@ void perform_unit_test(std::vector *tests, for (RegressionTest *t : *tests) { CustomDebugLog *debug_log = new CustomDebugLog(); - ModSecurity::ModSecurity *modsec = NULL; - ModSecurity::Rules *modsec_rules = NULL; - ModSecurity::Assay *modsec_assay = NULL; + modsecurity::ModSecurity *modsec = NULL; + modsecurity::Rules *modsec_rules = NULL; + modsecurity::Assay *modsec_assay = NULL; ModSecurityTestResults r; std::stringstream serverLog; RegressionTestResult *testRes = new RegressionTestResult(); @@ -104,11 +104,11 @@ void perform_unit_test(std::vector *tests, std::cout << std::setw(50) << std::left << filename; std::cout << std::setw(70) << std::left << t->name; - modsec = new ModSecurity::ModSecurity(); + modsec = new modsecurity::ModSecurity(); modsec->setConnectorInformation("ModSecurity-regression v0.0.1-alpha" \ " (ModSecurity regression test utility)"); modsec->setServerLogCb(logCb); - modsec_rules = new ModSecurity::Rules(debug_log); + modsec_rules = new modsecurity::Rules(debug_log); bool found = true; if (t->resource.empty() == false) { @@ -170,7 +170,7 @@ void perform_unit_test(std::vector *tests, } } - modsec_assay = new ModSecurity::Assay(modsec, modsec_rules, + modsec_assay = new modsecurity::Assay(modsec, modsec_rules, &serverLog); modsec_assay->processConnection(t->clientIp.c_str(), diff --git a/test/unit/unit.cc b/test/unit/unit.cc index 43a3d4d5..4449023c 100644 --- a/test/unit/unit.cc +++ b/test/unit/unit.cc @@ -33,8 +33,8 @@ using modsecurity_test::UnitTest; using modsecurity_test::ModSecurityTest; using modsecurity_test::ModSecurityTestResults; -using ModSecurity::actions::transformations::Transformation; -using ModSecurity::operators::Operator; +using modsecurity::actions::transformations::Transformation; +using modsecurity::operators::Operator; std::string default_test_path = "test-cases/secrules-language-tests/operators"; diff --git a/test/unit/unit_test.cc b/test/unit/unit_test.cc index 2f3bec44..dcc66ae2 100644 --- a/test/unit/unit_test.cc +++ b/test/unit/unit_test.cc @@ -72,9 +72,9 @@ std::string UnitTest::print() { i << this->obtained << "\"" << std::endl; } if (this->output != this->obtainedOutput) { - i << "Expecting: \"" << ModSecurity::toHexIfNeeded(this->output); + i << "Expecting: \"" << modsecurity::toHexIfNeeded(this->output); i << "\" - returned: \""; - i << ModSecurity::toHexIfNeeded(this->obtainedOutput) << "\""; + i << modsecurity::toHexIfNeeded(this->obtainedOutput) << "\""; i << std::endl; }