mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 10:20:35 +03:00
Make all "rule id" variables of type RuleId
Previously, ModSecurity inconsistently used RuleId, int and double for rule id variables in different places.
This commit is contained in:
@@ -2880,10 +2880,10 @@ namespace yy {
|
||||
#line 1480 "seclang-parser.yy"
|
||||
{
|
||||
std::string error;
|
||||
double ruleId;
|
||||
try {
|
||||
ruleId = std::stod(yystack_[1].value.as < std::string > ());
|
||||
} catch (...) {
|
||||
std::istringstream iss(yystack_[1].value.as < std::string > ());
|
||||
RuleId ruleId;
|
||||
iss >> ruleId;
|
||||
if (iss.fail()) {
|
||||
std::stringstream ss;
|
||||
ss << "SecRuleUpdateTargetById: failed to load:";
|
||||
ss << "The input \"" + yystack_[1].value.as < std::string > () + "\" does not ";
|
||||
@@ -2910,10 +2910,10 @@ namespace yy {
|
||||
#line 1506 "seclang-parser.yy"
|
||||
{
|
||||
std::string error;
|
||||
double ruleId;
|
||||
try {
|
||||
ruleId = std::stod(yystack_[1].value.as < std::string > ());
|
||||
} catch (...) {
|
||||
std::istringstream iss(yystack_[1].value.as < std::string > ());
|
||||
RuleId ruleId;
|
||||
iss >> ruleId;
|
||||
if (iss.fail()) {
|
||||
std::stringstream ss;
|
||||
ss << "SecRuleUpdateActionById: failed to load:";
|
||||
ss << "The input \"" + yystack_[1].value.as < std::string > () + "\" does not ";
|
||||
|
||||
@@ -1479,10 +1479,10 @@ expression:
|
||||
| CONFIG_SEC_RULE_UPDATE_TARGET_BY_ID variables_pre_process
|
||||
{
|
||||
std::string error;
|
||||
double ruleId;
|
||||
try {
|
||||
ruleId = std::stod($1);
|
||||
} catch (...) {
|
||||
std::istringstream iss($1);
|
||||
RuleId ruleId;
|
||||
iss >> ruleId;
|
||||
if (iss.fail()) {
|
||||
std::stringstream ss;
|
||||
ss << "SecRuleUpdateTargetById: failed to load:";
|
||||
ss << "The input \"" + $1 + "\" does not ";
|
||||
@@ -1505,10 +1505,10 @@ expression:
|
||||
| CONFIG_SEC_RULE_UPDATE_ACTION_BY_ID actions
|
||||
{
|
||||
std::string error;
|
||||
double ruleId;
|
||||
try {
|
||||
ruleId = std::stod($1);
|
||||
} catch (...) {
|
||||
std::istringstream iss($1);
|
||||
RuleId ruleId;
|
||||
iss >> ruleId;
|
||||
if (iss.fail()) {
|
||||
std::stringstream ss;
|
||||
ss << "SecRuleUpdateActionById: failed to load:";
|
||||
ss << "The input \"" + $1 + "\" does not ";
|
||||
|
||||
Reference in New Issue
Block a user