mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Align TIME_MON variable's behavior
This commit is contained in:
@@ -46,7 +46,7 @@ void TimeMon::evaluate(Transaction *transaction,
|
||||
struct tm timeinfo;
|
||||
localtime_r(&timer, &timeinfo);
|
||||
|
||||
transaction->m_variableTimeMin.assign(std::to_string(timeinfo.tm_mon));
|
||||
transaction->m_variableTimeMin.assign(std::to_string(timeinfo.tm_mon + 1));
|
||||
|
||||
l->push_back(new VariableValue(&m_retName,
|
||||
&transaction->m_variableTimeMin));
|
||||
|
@@ -33,7 +33,8 @@
|
||||
]
|
||||
},
|
||||
"expected":{
|
||||
"debug_log":"Target value: \"([0-9]+)\" \\(Variable: TIME_MON\\)"
|
||||
"http_code": 200,
|
||||
"debug_log":"Target value: \"[1-9][012]?\" \\(Variable: TIME_MON\\)"
|
||||
},
|
||||
"rules":[
|
||||
"SecRuleEngine On",
|
||||
|
Reference in New Issue
Block a user