mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Cosmetics: address cppcheck warnings on src/actions
This commit is contained in:
parent
a6620604d4
commit
9101a8ab15
@ -29,7 +29,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Accuracy : public Action {
|
class Accuracy : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Accuracy(std::string action)
|
explicit Accuracy(const std::string &action)
|
||||||
: Action(action, ConfigurationKind),
|
: Action(action, ConfigurationKind),
|
||||||
m_accuracy(0) { }
|
m_accuracy(0) { }
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
|
|
||||||
class AuditLog : public Action {
|
class AuditLog : public Action {
|
||||||
public:
|
public:
|
||||||
explicit AuditLog(std::string action)
|
explicit AuditLog(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction,
|
bool evaluate(Rule *rule, Transaction *transaction,
|
||||||
|
@ -33,7 +33,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Block : public Action {
|
class Block : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Block(std::string action) : Action(action) { }
|
explicit Block(const std::string &action) : Action(action) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction,
|
bool evaluate(Rule *rule, Transaction *transaction,
|
||||||
std::shared_ptr<RuleMessage> rm) override;
|
std::shared_ptr<RuleMessage> rm) override;
|
||||||
|
@ -28,7 +28,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Capture : public Action {
|
class Capture : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Capture(std::string action)
|
explicit Capture(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Chain : public Action {
|
class Chain : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Chain(std::string action)
|
explicit Chain(const std::string &action)
|
||||||
: Action(action, ConfigurationKind) { }
|
: Action(action, ConfigurationKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||||
|
@ -28,7 +28,7 @@ namespace ctl {
|
|||||||
|
|
||||||
class AuditLogParts : public Action {
|
class AuditLogParts : public Action {
|
||||||
public:
|
public:
|
||||||
explicit AuditLogParts(std::string action)
|
explicit AuditLogParts(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind),
|
: Action(action, RunTimeOnlyIfMatchKind),
|
||||||
mPartsAction(0),
|
mPartsAction(0),
|
||||||
mParts("") { }
|
mParts("") { }
|
||||||
|
@ -29,7 +29,7 @@ namespace ctl {
|
|||||||
|
|
||||||
class RequestBodyAccess : public Action {
|
class RequestBodyAccess : public Action {
|
||||||
public:
|
public:
|
||||||
explicit RequestBodyAccess(std::string action)
|
explicit RequestBodyAccess(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind),
|
: Action(action, RunTimeOnlyIfMatchKind),
|
||||||
m_request_body_access(false) { }
|
m_request_body_access(false) { }
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ namespace ctl {
|
|||||||
|
|
||||||
class RequestBodyProcessorJSON : public Action {
|
class RequestBodyProcessorJSON : public Action {
|
||||||
public:
|
public:
|
||||||
explicit RequestBodyProcessorJSON(std::string action)
|
explicit RequestBodyProcessorJSON(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||||
|
@ -28,7 +28,7 @@ namespace ctl {
|
|||||||
|
|
||||||
class RequestBodyProcessorURLENCODED : public Action {
|
class RequestBodyProcessorURLENCODED : public Action {
|
||||||
public:
|
public:
|
||||||
explicit RequestBodyProcessorURLENCODED(std::string action)
|
explicit RequestBodyProcessorURLENCODED(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||||
|
@ -28,7 +28,7 @@ namespace ctl {
|
|||||||
|
|
||||||
class RequestBodyProcessorXML : public Action {
|
class RequestBodyProcessorXML : public Action {
|
||||||
public:
|
public:
|
||||||
explicit RequestBodyProcessorXML(std::string action)
|
explicit RequestBodyProcessorXML(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||||
|
@ -30,7 +30,7 @@ namespace ctl {
|
|||||||
|
|
||||||
class RuleEngine : public Action {
|
class RuleEngine : public Action {
|
||||||
public:
|
public:
|
||||||
explicit RuleEngine(std::string action)
|
explicit RuleEngine(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind),
|
: Action(action, RunTimeOnlyIfMatchKind),
|
||||||
m_ruleEngine(RulesProperties::PropertyNotSetRuleEngine) { }
|
m_ruleEngine(RulesProperties::PropertyNotSetRuleEngine) { }
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace ctl {
|
|||||||
|
|
||||||
class RuleRemoveById : public Action {
|
class RuleRemoveById : public Action {
|
||||||
public:
|
public:
|
||||||
explicit RuleRemoveById(std::string action)
|
explicit RuleRemoveById(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool init(std::string *error) override;
|
bool init(std::string *error) override;
|
||||||
|
@ -29,7 +29,7 @@ namespace ctl {
|
|||||||
|
|
||||||
class RuleRemoveByTag : public Action {
|
class RuleRemoveByTag : public Action {
|
||||||
public:
|
public:
|
||||||
explicit RuleRemoveByTag(std::string action)
|
explicit RuleRemoveByTag(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind),
|
: Action(action, RunTimeOnlyIfMatchKind),
|
||||||
m_tag("") { }
|
m_tag("") { }
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace ctl {
|
|||||||
|
|
||||||
class RuleRemoveTargetById : public Action {
|
class RuleRemoveTargetById : public Action {
|
||||||
public:
|
public:
|
||||||
explicit RuleRemoveTargetById(std::string action)
|
explicit RuleRemoveTargetById(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind),
|
: Action(action, RunTimeOnlyIfMatchKind),
|
||||||
m_id(0),
|
m_id(0),
|
||||||
m_target("") { }
|
m_target("") { }
|
||||||
|
@ -29,7 +29,7 @@ namespace ctl {
|
|||||||
|
|
||||||
class RuleRemoveTargetByTag : public Action {
|
class RuleRemoveTargetByTag : public Action {
|
||||||
public:
|
public:
|
||||||
explicit RuleRemoveTargetByTag(std::string action)
|
explicit RuleRemoveTargetByTag(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool init(std::string *error) override;
|
bool init(std::string *error) override;
|
||||||
|
@ -33,7 +33,7 @@ namespace data {
|
|||||||
|
|
||||||
class Status : public Action {
|
class Status : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Status(std::string action) : Action(action, 2),
|
explicit Status(const std::string &action) : Action(action, 2),
|
||||||
m_status(0) { }
|
m_status(0) { }
|
||||||
|
|
||||||
bool init(std::string *error) override;
|
bool init(std::string *error) override;
|
||||||
|
@ -53,7 +53,7 @@ enum AllowType : int {
|
|||||||
|
|
||||||
class Allow : public Action {
|
class Allow : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Allow(std::string action)
|
explicit Allow(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind),
|
: Action(action, RunTimeOnlyIfMatchKind),
|
||||||
m_allowType(NoneAllowType) { }
|
m_allowType(NoneAllowType) { }
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ namespace disruptive {
|
|||||||
|
|
||||||
class Deny : public Action {
|
class Deny : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Deny(std::string action) : Action(action) { }
|
explicit Deny(const std::string &action) : Action(action) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction,
|
bool evaluate(Rule *rule, Transaction *transaction,
|
||||||
std::shared_ptr<RuleMessage> rm) override;
|
std::shared_ptr<RuleMessage> rm) override;
|
||||||
|
@ -31,7 +31,7 @@ namespace disruptive {
|
|||||||
|
|
||||||
class Drop : public Action {
|
class Drop : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Drop(std::string action) : Action(action) { }
|
explicit Drop(const std::string &action) : Action(action) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction,
|
bool evaluate(Rule *rule, Transaction *transaction,
|
||||||
std::shared_ptr<RuleMessage> rm) override;
|
std::shared_ptr<RuleMessage> rm) override;
|
||||||
|
@ -29,7 +29,7 @@ namespace disruptive {
|
|||||||
|
|
||||||
class Pass : public Action {
|
class Pass : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Pass(std::string action) : Action(action) { }
|
explicit Pass(const std::string &action) : Action(action) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction,
|
bool evaluate(Rule *rule, Transaction *transaction,
|
||||||
std::shared_ptr<RuleMessage> rm) override;
|
std::shared_ptr<RuleMessage> rm) override;
|
||||||
|
@ -38,10 +38,12 @@ class Redirect : public Action {
|
|||||||
public:
|
public:
|
||||||
explicit Redirect(const std::string &action)
|
explicit Redirect(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind),
|
: Action(action, RunTimeOnlyIfMatchKind),
|
||||||
m_status(0) { }
|
m_status(0),
|
||||||
|
m_string(nullptr) { }
|
||||||
|
|
||||||
explicit Redirect(std::unique_ptr<RunTimeString> z)
|
explicit Redirect(std::unique_ptr<RunTimeString> z)
|
||||||
: Action("redirert", RunTimeOnlyIfMatchKind),
|
: Action("redirert", RunTimeOnlyIfMatchKind),
|
||||||
|
m_status(0),
|
||||||
m_string(std::move(z)) { }
|
m_string(std::move(z)) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction,
|
bool evaluate(Rule *rule, Transaction *transaction,
|
||||||
|
@ -30,7 +30,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Exec : public Action {
|
class Exec : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Exec(std::string action)
|
explicit Exec(const std::string &action)
|
||||||
: Action(action),
|
: Action(action),
|
||||||
m_script("") { }
|
m_script("") { }
|
||||||
|
|
||||||
|
@ -32,9 +32,9 @@ namespace actions {
|
|||||||
|
|
||||||
class InitCol : public Action {
|
class InitCol : public Action {
|
||||||
public:
|
public:
|
||||||
explicit InitCol(std::string action) : Action(action) { }
|
explicit InitCol(const std::string &action) : Action(action) { }
|
||||||
|
|
||||||
InitCol(std::string action, std::unique_ptr<RunTimeString> z)
|
InitCol(const std::string &action, std::unique_ptr<RunTimeString> z)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind),
|
: Action(action, RunTimeOnlyIfMatchKind),
|
||||||
m_string(std::move(z)) { }
|
m_string(std::move(z)) { }
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Log : public Action {
|
class Log : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Log(std::string action)
|
explicit Log(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction,
|
bool evaluate(Rule *rule, Transaction *transaction,
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
|
|
||||||
class LogData : public Action {
|
class LogData : public Action {
|
||||||
public:
|
public:
|
||||||
explicit LogData(std::string action)
|
explicit LogData(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
explicit LogData(std::unique_ptr<RunTimeString> z)
|
explicit LogData(std::unique_ptr<RunTimeString> z)
|
||||||
|
@ -29,7 +29,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Maturity : public Action {
|
class Maturity : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Maturity(std::string action)
|
explicit Maturity(const std::string &action)
|
||||||
: Action(action, ConfigurationKind),
|
: Action(action, ConfigurationKind),
|
||||||
m_maturity(0) { }
|
m_maturity(0) { }
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Msg : public Action {
|
class Msg : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Msg(std::string action)
|
explicit Msg(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
explicit Msg(std::unique_ptr<RunTimeString> z)
|
explicit Msg(std::unique_ptr<RunTimeString> z)
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
|
|
||||||
class MultiMatch : public Action {
|
class MultiMatch : public Action {
|
||||||
public:
|
public:
|
||||||
explicit MultiMatch(std::string action)
|
explicit MultiMatch(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
|
|
||||||
class NoAuditLog : public Action {
|
class NoAuditLog : public Action {
|
||||||
public:
|
public:
|
||||||
explicit NoAuditLog(std::string action)
|
explicit NoAuditLog(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction,
|
bool evaluate(Rule *rule, Transaction *transaction,
|
||||||
|
@ -30,7 +30,7 @@ namespace actions {
|
|||||||
|
|
||||||
class NoLog : public Action {
|
class NoLog : public Action {
|
||||||
public:
|
public:
|
||||||
explicit NoLog(std::string action)
|
explicit NoLog(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction,
|
bool evaluate(Rule *rule, Transaction *transaction,
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Phase : public Action {
|
class Phase : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Phase(std::string action) : Action(action, ConfigurationKind),
|
explicit Phase(const std::string &action) : Action(action, ConfigurationKind),
|
||||||
m_phase(0),
|
m_phase(0),
|
||||||
m_secRulesPhase(0) { }
|
m_secRulesPhase(0) { }
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Rev : public Action {
|
class Rev : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Rev(std::string action) : Action(action, ConfigurationKind) { }
|
explicit Rev(const std::string &action) : Action(action, ConfigurationKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||||
bool init(std::string *error) override;
|
bool init(std::string *error) override;
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
|
|
||||||
class RuleId : public Action {
|
class RuleId : public Action {
|
||||||
public:
|
public:
|
||||||
explicit RuleId(std::string action)
|
explicit RuleId(const std::string &action)
|
||||||
: Action(action, ConfigurationKind),
|
: Action(action, ConfigurationKind),
|
||||||
m_ruleId(0) { }
|
m_ruleId(0) { }
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
|
|
||||||
class SetENV : public Action {
|
class SetENV : public Action {
|
||||||
public:
|
public:
|
||||||
explicit SetENV(std::string _action)
|
explicit SetENV(const std::string &_action)
|
||||||
: Action(_action) { }
|
: Action(_action) { }
|
||||||
|
|
||||||
explicit SetENV(std::unique_ptr<RunTimeString> z)
|
explicit SetENV(std::unique_ptr<RunTimeString> z)
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
|
|
||||||
class SetRSC : public Action {
|
class SetRSC : public Action {
|
||||||
public:
|
public:
|
||||||
explicit SetRSC(std::string _action)
|
explicit SetRSC(const std::string &_action)
|
||||||
: Action(_action) { }
|
: Action(_action) { }
|
||||||
|
|
||||||
explicit SetRSC(std::unique_ptr<RunTimeString> z)
|
explicit SetRSC(std::unique_ptr<RunTimeString> z)
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
|
|
||||||
class SetSID : public Action {
|
class SetSID : public Action {
|
||||||
public:
|
public:
|
||||||
explicit SetSID(std::string _action)
|
explicit SetSID(const std::string &_action)
|
||||||
: Action(_action) { }
|
: Action(_action) { }
|
||||||
|
|
||||||
explicit SetSID(std::unique_ptr<RunTimeString> z)
|
explicit SetSID(std::unique_ptr<RunTimeString> z)
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
|
|
||||||
class SetUID : public Action {
|
class SetUID : public Action {
|
||||||
public:
|
public:
|
||||||
explicit SetUID(std::string _action)
|
explicit SetUID(const std::string &_action)
|
||||||
: Action(_action) { }
|
: Action(_action) { }
|
||||||
|
|
||||||
explicit SetUID(std::unique_ptr<RunTimeString> z)
|
explicit SetUID(std::unique_ptr<RunTimeString> z)
|
||||||
|
@ -31,7 +31,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Severity : public Action {
|
class Severity : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Severity(std::string action)
|
explicit Severity(const std::string &action)
|
||||||
: Action(action),
|
: Action(action),
|
||||||
m_severity(0) { }
|
m_severity(0) { }
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Skip : public Action {
|
class Skip : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Skip(std::string action)
|
explicit Skip(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind),
|
: Action(action, RunTimeOnlyIfMatchKind),
|
||||||
m_skip_next(0) { }
|
m_skip_next(0) { }
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace actions {
|
|||||||
|
|
||||||
class SkipAfter : public Action {
|
class SkipAfter : public Action {
|
||||||
public:
|
public:
|
||||||
explicit SkipAfter(std::string action)
|
explicit SkipAfter(const std::string &action)
|
||||||
: Action(action, RunTimeOnlyIfMatchKind) { }
|
: Action(action, RunTimeOnlyIfMatchKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class Base64Decode : public Transformation {
|
class Base64Decode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit Base64Decode(std::string action) : Transformation(action) { }
|
explicit Base64Decode(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class Base64DecodeExt : public Transformation {
|
class Base64DecodeExt : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit Base64DecodeExt(std::string action) : Transformation(action) { }
|
explicit Base64DecodeExt(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class Base64Encode : public Transformation {
|
class Base64Encode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit Base64Encode(std::string action) : Transformation(action) { }
|
explicit Base64Encode(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class CmdLine : public Transformation {
|
class CmdLine : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit CmdLine(std::string action)
|
explicit CmdLine(const std::string &action)
|
||||||
: Transformation(action) { }
|
: Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
|
@ -30,7 +30,7 @@ namespace modsecurity {
|
|||||||
namespace actions {
|
namespace actions {
|
||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
CompressWhitespace::CompressWhitespace(std::string action)
|
CompressWhitespace::CompressWhitespace(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class CompressWhitespace : public Transformation {
|
class CompressWhitespace : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit CompressWhitespace(std::string action);
|
explicit CompressWhitespace(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class CssDecode : public Transformation {
|
class CssDecode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit CssDecode(std::string action)
|
explicit CssDecode(const std::string &action)
|
||||||
: Transformation(action) { }
|
: Transformation(action) { }
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
@ -31,7 +31,7 @@ namespace modsecurity {
|
|||||||
namespace actions {
|
namespace actions {
|
||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
EscapeSeqDecode::EscapeSeqDecode(std::string action)
|
EscapeSeqDecode::EscapeSeqDecode(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class EscapeSeqDecode : public Transformation {
|
class EscapeSeqDecode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit EscapeSeqDecode(std::string action);
|
explicit EscapeSeqDecode(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
int ansi_c_sequences_decode_inplace(unsigned char *input, int input_len);
|
int ansi_c_sequences_decode_inplace(unsigned char *input, int input_len);
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class HexDecode : public Transformation {
|
class HexDecode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit HexDecode(std::string action) : Transformation(action) { }
|
explicit HexDecode(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
@ -31,7 +31,7 @@ namespace modsecurity {
|
|||||||
namespace actions {
|
namespace actions {
|
||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
HexEncode::HexEncode(std::string action)
|
HexEncode::HexEncode(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class HexEncode : public Transformation {
|
class HexEncode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit HexEncode(std::string action);
|
explicit HexEncode(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -60,7 +60,7 @@ int HtmlEntityDecode::inplace(unsigned char *input, uint64_t input_len) {
|
|||||||
unsigned char *d = input;
|
unsigned char *d = input;
|
||||||
int i, count;
|
int i, count;
|
||||||
|
|
||||||
if ((input == NULL) || (input_len <= 0)) {
|
if ((input == NULL) || (input_len == 0)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class HtmlEntityDecode : public Transformation {
|
class HtmlEntityDecode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit HtmlEntityDecode(std::string action)
|
explicit HtmlEntityDecode(const std::string &action)
|
||||||
: Transformation(action) { }
|
: Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class JsDecode : public Transformation {
|
class JsDecode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit JsDecode(std::string action)
|
explicit JsDecode(const std::string &action)
|
||||||
: Transformation(action) { }
|
: Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
|
@ -30,7 +30,7 @@ namespace modsecurity {
|
|||||||
namespace actions {
|
namespace actions {
|
||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
Length::Length(std::string action)
|
Length::Length(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class Length : public Transformation {
|
class Length : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit Length(std::string action);
|
explicit Length(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ namespace actions {
|
|||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
|
|
||||||
LowerCase::LowerCase(std::string a)
|
LowerCase::LowerCase(const std::string &a)
|
||||||
: Transformation(a) {
|
: Transformation(a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class LowerCase : public Transformation {
|
class LowerCase : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit LowerCase(std::string action);
|
explicit LowerCase(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class Md5 : public Transformation {
|
class Md5 : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit Md5(std::string action) : Transformation(action) { }
|
explicit Md5(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class None : public Transformation {
|
class None : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit None(std::string action)
|
explicit None(const std::string &action)
|
||||||
: Transformation(action)
|
: Transformation(action)
|
||||||
{ m_isNone = true; }
|
{ m_isNone = true; }
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ namespace modsecurity {
|
|||||||
namespace actions {
|
namespace actions {
|
||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
NormalisePath::NormalisePath(std::string action)
|
NormalisePath::NormalisePath(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class NormalisePath : public Transformation {
|
class NormalisePath : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit NormalisePath(std::string action);
|
explicit NormalisePath(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class NormalisePathWin : public Transformation {
|
class NormalisePathWin : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit NormalisePathWin(std::string action)
|
explicit NormalisePathWin(const std::string &action)
|
||||||
: Transformation(action) { }
|
: Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class ParityEven7bit : public Transformation {
|
class ParityEven7bit : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit ParityEven7bit(std::string action) : Transformation(action) { }
|
explicit ParityEven7bit(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp, Transaction *transaction) override;
|
std::string evaluate(std::string exp, Transaction *transaction) override;
|
||||||
static bool inplace(unsigned char *input, uint64_t input_len);
|
static bool inplace(unsigned char *input, uint64_t input_len);
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class ParityOdd7bit : public Transformation {
|
class ParityOdd7bit : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit ParityOdd7bit(std::string action) : Transformation(action) { }
|
explicit ParityOdd7bit(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp, Transaction *transaction) override;
|
std::string evaluate(std::string exp, Transaction *transaction) override;
|
||||||
static bool inplace(unsigned char *input, uint64_t input_len);
|
static bool inplace(unsigned char *input, uint64_t input_len);
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class ParityZero7bit : public Transformation {
|
class ParityZero7bit : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit ParityZero7bit(std::string action) : Transformation(action) { }
|
explicit ParityZero7bit(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp, Transaction *transaction) override;
|
std::string evaluate(std::string exp, Transaction *transaction) override;
|
||||||
static bool inplace(unsigned char *input, uint64_t input_len);
|
static bool inplace(unsigned char *input, uint64_t input_len);
|
||||||
|
@ -31,7 +31,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class RemoveComments : public Transformation {
|
class RemoveComments : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit RemoveComments(std::string action) : Transformation(action) { }
|
explicit RemoveComments(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
@ -30,7 +30,7 @@ namespace modsecurity {
|
|||||||
namespace actions {
|
namespace actions {
|
||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
RemoveCommentsChar::RemoveCommentsChar(std::string action)
|
RemoveCommentsChar::RemoveCommentsChar(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class RemoveCommentsChar : public Transformation {
|
class RemoveCommentsChar : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit RemoveCommentsChar(std::string action);
|
explicit RemoveCommentsChar(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class RemoveNulls : public Transformation {
|
class RemoveNulls : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit RemoveNulls(std::string action)
|
explicit RemoveNulls(const std::string &action)
|
||||||
: Transformation(action) { }
|
: Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
|
@ -31,7 +31,7 @@ namespace modsecurity {
|
|||||||
namespace actions {
|
namespace actions {
|
||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
RemoveWhitespace::RemoveWhitespace(std::string action)
|
RemoveWhitespace::RemoveWhitespace(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class RemoveWhitespace : public Transformation {
|
class RemoveWhitespace : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit RemoveWhitespace(std::string action);
|
explicit RemoveWhitespace(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,7 @@ namespace modsecurity {
|
|||||||
namespace actions {
|
namespace actions {
|
||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
ReplaceComments::ReplaceComments(std::string action)
|
ReplaceComments::ReplaceComments(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class ReplaceComments : public Transformation {
|
class ReplaceComments : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit ReplaceComments(std::string action);
|
explicit ReplaceComments(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -30,7 +30,7 @@ namespace modsecurity {
|
|||||||
namespace actions {
|
namespace actions {
|
||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
ReplaceNulls::ReplaceNulls(std::string action)
|
ReplaceNulls::ReplaceNulls(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class ReplaceNulls : public Transformation {
|
class ReplaceNulls : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit ReplaceNulls(std::string action);
|
explicit ReplaceNulls(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,7 @@ namespace modsecurity {
|
|||||||
namespace actions {
|
namespace actions {
|
||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
Sha1::Sha1(std::string action)
|
Sha1::Sha1(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class Sha1 : public Transformation {
|
class Sha1 : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit Sha1(std::string action);
|
explicit Sha1(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class SqlHexDecode : public Transformation {
|
class SqlHexDecode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit SqlHexDecode(std::string action) : Transformation(action) { }
|
explicit SqlHexDecode(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
@ -50,7 +50,7 @@ std::string *Trim::trim(std::string *s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Trim::Trim(std::string action)
|
Trim::Trim(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class Trim : public Transformation {
|
class Trim : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit Trim(std::string action);
|
explicit Trim(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ namespace transformations {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
TrimLeft::TrimLeft(std::string action)
|
TrimLeft::TrimLeft(const std::string &action)
|
||||||
: Trim(action) {
|
: Trim(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class TrimLeft : public Trim {
|
class TrimLeft : public Trim {
|
||||||
public:
|
public:
|
||||||
explicit TrimLeft(std::string action);
|
explicit TrimLeft(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,7 @@ namespace actions {
|
|||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
|
|
||||||
TrimRight::TrimRight(std::string action)
|
TrimRight::TrimRight(const std::string &action)
|
||||||
: Trim(action) {
|
: Trim(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class TrimRight : public Trim {
|
class TrimRight : public Trim {
|
||||||
public:
|
public:
|
||||||
explicit TrimRight(std::string action);
|
explicit TrimRight(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ namespace actions {
|
|||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
|
|
||||||
UpperCase::UpperCase(std::string a)
|
UpperCase::UpperCase(const std::string &a)
|
||||||
: Transformation(a) {
|
: Transformation(a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class UpperCase : public Transformation {
|
class UpperCase : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit UpperCase(std::string action);
|
explicit UpperCase(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -32,7 +32,7 @@ namespace actions {
|
|||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
|
|
||||||
UrlDecode::UrlDecode(std::string action)
|
UrlDecode::UrlDecode(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class UrlDecode : public Transformation {
|
class UrlDecode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit UrlDecode(std::string action);
|
explicit UrlDecode(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
};
|
};
|
||||||
|
@ -31,7 +31,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class UrlDecodeUni : public Transformation {
|
class UrlDecodeUni : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit UrlDecodeUni(std::string action) : Transformation(action) { }
|
explicit UrlDecodeUni(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp, Transaction *transaction) override;
|
std::string evaluate(std::string exp, Transaction *transaction) override;
|
||||||
static int inplace(unsigned char *input, uint64_t input_len,
|
static int inplace(unsigned char *input, uint64_t input_len,
|
||||||
|
@ -31,7 +31,7 @@ namespace actions {
|
|||||||
namespace transformations {
|
namespace transformations {
|
||||||
|
|
||||||
|
|
||||||
UrlEncode::UrlEncode(std::string action)
|
UrlEncode::UrlEncode(const std::string &action)
|
||||||
: Transformation(action) {
|
: Transformation(action) {
|
||||||
this->action_kind = 1;
|
this->action_kind = 1;
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class UrlEncode : public Transformation {
|
class UrlEncode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit UrlEncode(std::string action);
|
explicit UrlEncode(const std::string &action) ;
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ namespace transformations {
|
|||||||
|
|
||||||
class Utf8ToUnicode : public Transformation {
|
class Utf8ToUnicode : public Transformation {
|
||||||
public:
|
public:
|
||||||
explicit Utf8ToUnicode(std::string action) : Transformation(action) { }
|
explicit Utf8ToUnicode(const std::string &action) : Transformation(action) { }
|
||||||
|
|
||||||
std::string evaluate(std::string exp,
|
std::string evaluate(std::string exp,
|
||||||
Transaction *transaction) override;
|
Transaction *transaction) override;
|
||||||
|
@ -29,7 +29,7 @@ namespace actions {
|
|||||||
|
|
||||||
class Ver : public Action {
|
class Ver : public Action {
|
||||||
public:
|
public:
|
||||||
explicit Ver(std::string action) : Action(action, ConfigurationKind) { }
|
explicit Ver(const std::string &action) : Action(action, ConfigurationKind) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace actions {
|
|||||||
|
|
||||||
class XmlNS : public Action {
|
class XmlNS : public Action {
|
||||||
public:
|
public:
|
||||||
explicit XmlNS(std::string action) : Action(action) { }
|
explicit XmlNS(const std::string &action) : Action(action) { }
|
||||||
|
|
||||||
bool evaluate(Rule *rule, Transaction *transaction) override {
|
bool evaluate(Rule *rule, Transaction *transaction) override {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user