mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Cosmetics: Fix coding style
This commit is contained in:
@@ -43,4 +43,5 @@ class RemoteUser : public Variable {
|
||||
} // namespace Variables
|
||||
} // namespace modsecurity
|
||||
|
||||
#endif // SRC_VARIABLES_REMOTE_USER_H_
|
||||
#endif // SRC_VARIABLES_REMOTE_USER_H_
|
||||
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <utility>
|
||||
#include <map>
|
||||
|
||||
#include "modsecurity/transaction.h"
|
||||
#include "modsecurity/rules_properties.h"
|
||||
@@ -54,7 +55,7 @@ void Rule::evaluateInternal(Transaction *t,
|
||||
|
||||
// id
|
||||
envs.insert(std::pair<std::string, std::string>("RULE:id",
|
||||
std::to_string(rule->rule_id)));
|
||||
std::to_string(rule->rule_id)));
|
||||
|
||||
// rev
|
||||
envs.insert(std::pair<std::string, std::string>("RULE:rev",
|
||||
|
@@ -30,7 +30,7 @@ namespace Variables {
|
||||
class Rule : public Variable {
|
||||
public:
|
||||
explicit Rule(std::string _name)
|
||||
: Variable(_name) { };
|
||||
: Variable(_name) { }
|
||||
|
||||
void evaluateInternal(Transaction *transaction,
|
||||
modsecurity::Rule *rule,
|
||||
|
@@ -37,7 +37,8 @@ Variable::Variable(std::string name)
|
||||
m_isCount(false) {
|
||||
if (m_name.find(":") != std::string::npos) {
|
||||
std::string col = toupper(std::string(m_name, 0, m_name.find(":")));
|
||||
std::string name = std::string(m_name, m_name.find(":") + 1, m_name.size());
|
||||
std::string name = std::string(m_name, m_name.find(":") + 1,
|
||||
m_name.size());
|
||||
if (col == "TX" || col == "IP" || col == "GLOBAL"
|
||||
|| col == "RESOURCE" || col == "SESSION") {
|
||||
m_collectionName = col;
|
||||
@@ -83,7 +84,8 @@ Variable::Variable(std::string name, VariableKind kind)
|
||||
m_isCount(false) {
|
||||
if (m_name.find(":") != std::string::npos) {
|
||||
std::string col = toupper(std::string(m_name, 0, m_name.find(":")));
|
||||
std::string name = std::string(m_name, m_name.find(":") + 1, m_name.size());
|
||||
std::string name = std::string(m_name, m_name.find(":") + 1,
|
||||
m_name.size());
|
||||
if (col == "TX" || col == "IP" || col == "GLOBAL"
|
||||
|| col == "RESOURCE" || col == "SESSION") {
|
||||
m_collectionName = col;
|
||||
|
Reference in New Issue
Block a user