mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Refactoring in Rule: Meaningful structures name
This commit is contained in:
@@ -44,11 +44,18 @@ class Msg;
|
||||
class Rev;
|
||||
class SetVar;
|
||||
class Tag;
|
||||
namespace transformations {
|
||||
class Transformation;
|
||||
}
|
||||
}
|
||||
namespace operators {
|
||||
class Operator;
|
||||
}
|
||||
|
||||
using TransformationResult = std::pair<std::shared_ptr<std::string>,
|
||||
std::shared_ptr<std::string>>;
|
||||
using TransformationResults = std::list<TransformationResult>;
|
||||
|
||||
class Rule {
|
||||
public:
|
||||
Rule(operators::Operator *_op,
|
||||
@@ -68,13 +75,6 @@ class Rule {
|
||||
bool containsBlock, std::shared_ptr<RuleMessage> ruleMessage,
|
||||
actions::Action *a, bool context);
|
||||
|
||||
inline void executeTransformation(actions::Action *a,
|
||||
std::shared_ptr<std::string> *value,
|
||||
Transaction *trans,
|
||||
std::list<std::pair<std::shared_ptr<std::string>,
|
||||
std::shared_ptr<std::string>>> *ret,
|
||||
std::string *path,
|
||||
int *nth) const;
|
||||
|
||||
void getVariablesExceptions(Transaction *t,
|
||||
variables::Variables *exclusion, variables::Variables *addition);
|
||||
@@ -83,10 +83,6 @@ class Rule {
|
||||
void executeActionsAfterFullMatch(Transaction *trasn,
|
||||
bool containsDisruptive, std::shared_ptr<RuleMessage> ruleMessage);
|
||||
|
||||
std::list<std::pair<std::shared_ptr<std::string>,
|
||||
std::shared_ptr<std::string>>> executeDefaultTransformations(
|
||||
Transaction *trasn, const std::string &value);
|
||||
|
||||
bool executeOperatorAt(Transaction *trasn, const std::string &key,
|
||||
std::string value, std::shared_ptr<RuleMessage> rm);
|
||||
void executeActionsIndependentOfChainedRuleResult(Transaction *trasn,
|
||||
@@ -100,15 +96,17 @@ class Rule {
|
||||
bool containsTag(const std::string& name, Transaction *t);
|
||||
bool containsMsg(const std::string& name, Transaction *t);
|
||||
|
||||
|
||||
void executeTransformations(
|
||||
actions::Action *a,
|
||||
std::shared_ptr<std::string> newValue,
|
||||
std::shared_ptr<std::string> value,
|
||||
Transaction *trasn, const std::string &value, TransformationResults &ret);
|
||||
inline void executeTransformation(
|
||||
actions::transformations::Transformation *a,
|
||||
std::shared_ptr<std::string> *value,
|
||||
Transaction *trans,
|
||||
std::list<std::pair<std::shared_ptr<std::string>,
|
||||
std::shared_ptr<std::string>>> *ret,
|
||||
std::shared_ptr<std::string> transStr,
|
||||
int nth);
|
||||
TransformationResults *ret,
|
||||
std::string *path,
|
||||
int *nth) const;
|
||||
|
||||
|
||||
actions::Action *m_theDisruptiveAction;
|
||||
actions::LogData *m_logData;
|
||||
|
Reference in New Issue
Block a user