mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-18 18:30: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 ";
|
||||
|
||||
Reference in New Issue
Block a user