mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Align TIME_MON variable's behavior
This commit is contained in:
parent
fd4564131f
commit
db7e4cb67b
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user