mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Cosmetics: Fix coding style
This commit is contained in:
@@ -25,8 +25,7 @@ namespace actions {
|
||||
|
||||
CtlAuditLogParts::CtlAuditLogParts(std::string action)
|
||||
: Action(action, RunTimeOnlyIfMatchKind),
|
||||
mPartsAction(0)
|
||||
{
|
||||
mPartsAction(0) {
|
||||
std::string what(action, 18, 1);
|
||||
mParts = std::string(action, 19, action.length()-19);
|
||||
if (what == "+") {
|
||||
|
@@ -18,8 +18,8 @@
|
||||
#include "actions/action.h"
|
||||
#include "modsecurity/assay.h"
|
||||
|
||||
#ifndef SRC_CLT_ACTIONS_AUDIT_LOG_PARTS_H_
|
||||
#define SRC_CLT_ACTIONS_AUDIT_LOG_PARTS_H_
|
||||
#ifndef SRC_ACTIONS_CTL_AUDIT_LOG_PARTS_H_
|
||||
#define SRC_ACTIONS_CTL_AUDIT_LOG_PARTS_H_
|
||||
|
||||
namespace ModSecurity {
|
||||
namespace actions {
|
||||
@@ -37,4 +37,4 @@ class CtlAuditLogParts : public Action {
|
||||
} // namespace actions
|
||||
} // namespace ModSecurity
|
||||
|
||||
#endif // SRC_CLT_ACTIONS_AUDIT_LOG_PARTS_H_
|
||||
#endif // SRC_ACTIONS_CTL_AUDIT_LOG_PARTS_H_
|
||||
|
@@ -36,9 +36,6 @@ bool Pass::evaluate(Rule *rule, Assay *assay) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void Pass::fill_intervention(ModSecurityIntervention *i) {
|
||||
|
||||
}
|
||||
|
||||
} // namespace actions
|
||||
} // namespace ModSecurity
|
||||
|
@@ -30,7 +30,6 @@ class Pass : public Action {
|
||||
explicit Pass(std::string action);
|
||||
|
||||
bool evaluate(Rule *rule, Assay *assay) override;
|
||||
void fill_intervention(ModSecurityIntervention *i) override;
|
||||
bool isDisruptive() override { return true; }
|
||||
};
|
||||
|
||||
|
@@ -43,7 +43,8 @@ Phase::Phase(std::string action)
|
||||
} catch (...) {
|
||||
this->phase = 0;
|
||||
if (tolower(a) == "request") {
|
||||
this->phase = this->phase + ModSecurity::Phases::RequestHeadersPhase;
|
||||
this->phase = this->phase +
|
||||
ModSecurity::Phases::RequestHeadersPhase;
|
||||
m_secRulesPhase = 2;
|
||||
}
|
||||
if (tolower(a) == "response") {
|
||||
|
@@ -36,14 +36,16 @@ bool RuleId::init(std::string *error) {
|
||||
m_ruleId = std::stod(a);
|
||||
} catch (...) {
|
||||
m_ruleId = 0;
|
||||
error->assign("The input \"" + a + "\" does not seems to be a valid rule id.");
|
||||
error->assign("The input \"" + a + "\" does not " \
|
||||
"seems to be a valid rule id.");
|
||||
return false;
|
||||
}
|
||||
|
||||
std::ostringstream oss;
|
||||
oss << std::setprecision(40) << m_ruleId;
|
||||
if (a != oss.str() || m_ruleId < 0) {
|
||||
error->assign("The input \"" + a + "\" does not seems to be a valid rule id.");
|
||||
error->assign("The input \"" + a + "\" does not seems " \
|
||||
"to be a valid rule id.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@@ -38,7 +38,7 @@ class RuleId : public Action {
|
||||
bool init(std::string *error) override;
|
||||
bool evaluate(Rule *rule, Assay *assay) override;
|
||||
|
||||
private:
|
||||
private:
|
||||
double m_ruleId;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user