mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-19 18:54:23 +03:00
Refactoring in the Rule class to make it more elegant
This commit is contained in:
@@ -49,7 +49,7 @@ bool RuleId::init(std::string *error) {
|
||||
|
||||
|
||||
bool RuleId::evaluate(RuleWithActions *rule, Transaction *transaction) {
|
||||
rule->m_ruleId = m_ruleId;
|
||||
rule->setId(m_ruleId);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class EscapeSeqDecode : public Transformation {
|
||||
|
||||
std::string evaluate(const std::string &exp,
|
||||
Transaction *transaction) override;
|
||||
int ansi_c_sequences_decode_inplace(unsigned char *input, int input_len);
|
||||
static int ansi_c_sequences_decode_inplace(unsigned char *input, int input_len);
|
||||
};
|
||||
|
||||
} // namespace transformations
|
||||
|
||||
@@ -36,7 +36,7 @@ class UrlEncode : public Transformation {
|
||||
std::string evaluate(const std::string &exp,
|
||||
Transaction *transaction) override;
|
||||
|
||||
std::string url_enc(const char *input,
|
||||
static std::string url_enc(const char *input,
|
||||
unsigned int input_len, int *changed);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user