mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-15 17:12:14 +03:00
EOD commit
This commit is contained in:
@@ -72,7 +72,7 @@ class Rule {
|
|||||||
std::shared_ptr<std::string> *value,
|
std::shared_ptr<std::string> *value,
|
||||||
Transaction *trans,
|
Transaction *trans,
|
||||||
std::list<std::pair<std::shared_ptr<std::string>,
|
std::list<std::pair<std::shared_ptr<std::string>,
|
||||||
std::shared_ptr<std::string>>> *ret,
|
std::weak_ptr<std::string>>> *ret,
|
||||||
std::string *path,
|
std::string *path,
|
||||||
int *nth);
|
int *nth);
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ class Rule {
|
|||||||
bool containsDisruptive, std::shared_ptr<RuleMessage> ruleMessage);
|
bool containsDisruptive, std::shared_ptr<RuleMessage> ruleMessage);
|
||||||
|
|
||||||
std::list<std::pair<std::shared_ptr<std::string>,
|
std::list<std::pair<std::shared_ptr<std::string>,
|
||||||
std::shared_ptr<std::string>>> executeDefaultTransformations(
|
std::weak_ptr<std::string>>> executeDefaultTransformations(
|
||||||
Transaction *trasn, const std::string &value);
|
Transaction *trasn, const std::string &value);
|
||||||
|
|
||||||
bool executeOperatorAt(Transaction *trasn, std::string key,
|
bool executeOperatorAt(Transaction *trasn, std::string key,
|
||||||
@@ -106,7 +106,7 @@ class Rule {
|
|||||||
std::shared_ptr<std::string> value,
|
std::shared_ptr<std::string> value,
|
||||||
Transaction *trans,
|
Transaction *trans,
|
||||||
std::list<std::pair<std::shared_ptr<std::string>,
|
std::list<std::pair<std::shared_ptr<std::string>,
|
||||||
std::shared_ptr<std::string>>> *ret,
|
std::weak_ptr<std::string>>> *ret,
|
||||||
std::shared_ptr<std::string> transStr,
|
std::shared_ptr<std::string> transStr,
|
||||||
int nth);
|
int nth);
|
||||||
|
|
||||||
|
|||||||
10
src/rule.cc
10
src/rule.cc
@@ -330,7 +330,7 @@ inline void Rule::executeTransformation(actions::Action *a,
|
|||||||
std::shared_ptr<std::string> *value,
|
std::shared_ptr<std::string> *value,
|
||||||
Transaction *trans,
|
Transaction *trans,
|
||||||
std::list<std::pair<std::shared_ptr<std::string>,
|
std::list<std::pair<std::shared_ptr<std::string>,
|
||||||
std::shared_ptr<std::string>>> *ret,
|
std::weak_ptr<std::string>>> *ret,
|
||||||
std::string *path,
|
std::string *path,
|
||||||
int *nth) {
|
int *nth) {
|
||||||
|
|
||||||
@@ -338,7 +338,7 @@ inline void Rule::executeTransformation(actions::Action *a,
|
|||||||
std::string newValue = a->evaluate(*oldValue, trans);
|
std::string newValue = a->evaluate(*oldValue, trans);
|
||||||
|
|
||||||
if (newValue != *oldValue) {
|
if (newValue != *oldValue) {
|
||||||
std::shared_ptr<std::string> u(new std::string(newValue));
|
std::shared_ptr<std::string> u(&newValue);
|
||||||
if (m_containsMultiMatchAction) {
|
if (m_containsMultiMatchAction) {
|
||||||
ret->push_back(std::make_pair(u, a->m_name));
|
ret->push_back(std::make_pair(u, a->m_name));
|
||||||
(*nth)++;
|
(*nth)++;
|
||||||
@@ -360,14 +360,14 @@ inline void Rule::executeTransformation(actions::Action *a,
|
|||||||
|
|
||||||
|
|
||||||
std::list<std::pair<std::shared_ptr<std::string>,
|
std::list<std::pair<std::shared_ptr<std::string>,
|
||||||
std::shared_ptr<std::string>>>
|
std::weak_ptr<std::string>>>
|
||||||
Rule::executeDefaultTransformations(
|
Rule::executeDefaultTransformations(
|
||||||
Transaction *trans, const std::string &in) {
|
Transaction *trans, const std::string &in) {
|
||||||
int none = 0;
|
int none = 0;
|
||||||
int transformations = 0;
|
int transformations = 0;
|
||||||
std::string path("");
|
std::string path("");
|
||||||
std::list<std::pair<std::shared_ptr<std::string>,
|
std::list<std::pair<std::shared_ptr<std::string>,
|
||||||
std::shared_ptr<std::string>>> ret;
|
std::weak_ptr<std::string>>> ret;
|
||||||
std::shared_ptr<std::string> value =
|
std::shared_ptr<std::string> value =
|
||||||
std::shared_ptr<std::string>(new std::string(in));
|
std::shared_ptr<std::string>(new std::string(in));
|
||||||
|
|
||||||
@@ -716,7 +716,7 @@ bool Rule::evaluate(Transaction *trans,
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::list<std::pair<std::shared_ptr<std::string>,
|
std::list<std::pair<std::shared_ptr<std::string>,
|
||||||
std::shared_ptr<std::string>>> values;
|
std::weak_ptr<std::string>>> values;
|
||||||
|
|
||||||
values = executeDefaultTransformations(trans, value);
|
values = executeDefaultTransformations(trans, value);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user