mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 19:47:47 +03:00
Rename FromNowOneAllowType to FromNowOnAllowType.
This misspelling is confusing (is it allow one more rule, or all of them?) and since v3 isn't released yet, use the major version bump opportunity to rectify it.
This commit is contained in:
committed by
Felipe Zimmerle
parent
bce5ef7704
commit
515e073503
@@ -37,7 +37,7 @@ bool Allow::init(std::string *error) {
|
|||||||
} else if (a == "request") {
|
} else if (a == "request") {
|
||||||
m_allowType = RequestAllowType;
|
m_allowType = RequestAllowType;
|
||||||
} else if (a == "") {
|
} else if (a == "") {
|
||||||
m_allowType = FromNowOneAllowType;
|
m_allowType = FromNowOnAllowType;
|
||||||
} else {
|
} else {
|
||||||
error->assign("Allow: if specified, the parameter " \
|
error->assign("Allow: if specified, the parameter " \
|
||||||
"most be: phase, request");
|
"most be: phase, request");
|
||||||
|
@@ -47,7 +47,7 @@ enum AllowType : int {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
FromNowOneAllowType,
|
FromNowOnAllowType,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -71,8 +71,8 @@ class Allow : public Action {
|
|||||||
return "Request";
|
return "Request";
|
||||||
} else if (a == PhaseAllowType) {
|
} else if (a == PhaseAllowType) {
|
||||||
return "Phase";
|
return "Phase";
|
||||||
} else if (a == FromNowOneAllowType) {
|
} else if (a == FromNowOnAllowType) {
|
||||||
return "FromNowOne";
|
return "FromNowOn";
|
||||||
} else {
|
} else {
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
|
@@ -167,7 +167,7 @@ int Rules::evaluate(int phase, Transaction *transaction) {
|
|||||||
debug(9, "This phase consists of " + std::to_string(rules.size()) + \
|
debug(9, "This phase consists of " + std::to_string(rules.size()) + \
|
||||||
" rule(s).");
|
" rule(s).");
|
||||||
|
|
||||||
if (transaction->m_allowType == actions::disruptive::FromNowOneAllowType
|
if (transaction->m_allowType == actions::disruptive::FromNowOnAllowType
|
||||||
&& phase != modsecurity::Phases::LoggingPhase) {
|
&& phase != modsecurity::Phases::LoggingPhase) {
|
||||||
debug(9, "Skipping all rules evaluation on this phase as request " \
|
debug(9, "Skipping all rules evaluation on this phase as request " \
|
||||||
"through the utilization of an `allow' action.");
|
"through the utilization of an `allow' action.");
|
||||||
|
Reference in New Issue
Block a user