mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Cosmetics: Fix coding style
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#define SRC_OPERATORS_CONTAINS_H_
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
|
||||
#include "modsecurity/assay.h"
|
||||
#include "operators/operator.h"
|
||||
|
@@ -59,9 +59,10 @@ void Pm::postOrderTraversal(acmp_btree_node_t *node) {
|
||||
node = NULL;
|
||||
}
|
||||
|
||||
void Pm::replaceAll(std::string& str, const std::string& from, const std::string& to) {
|
||||
void Pm::replaceAll(std::string str, const std::string& from,
|
||||
const std::string& to) {
|
||||
size_t start_pos = 0;
|
||||
while((start_pos = str.find(from, start_pos)) != std::string::npos) {
|
||||
while ((start_pos = str.find(from, start_pos)) != std::string::npos) {
|
||||
size_t end_pos = start_pos + from.length();
|
||||
str.replace(start_pos, end_pos, to);
|
||||
start_pos += to.length();
|
||||
|
@@ -35,7 +35,8 @@ class Pm : public Operator {
|
||||
m_p = acmp_create(0);
|
||||
}
|
||||
~Pm();
|
||||
void replaceAll(std::string& str, const std::string& from, const std::string& to);
|
||||
void replaceAll(std::string str, const std::string& from,
|
||||
const std::string& to);
|
||||
bool evaluate(Assay *assay, const std::string &input);
|
||||
|
||||
virtual bool init(const char **error);
|
||||
|
@@ -30,7 +30,7 @@ bool Rx::evaluate(Assay *assay, const std::string& input) {
|
||||
SMatch match;
|
||||
|
||||
if (regex_search(input, &match, *m_re) && match.size() >= 1) {
|
||||
//this->matched.push_back(match.match);
|
||||
// this->matched.push_back(match.match);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user