mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Merge pull request #3306 from airween/v3/time_mon_fix
fix: align TIME_MON variable's behavior
This commit is contained in:
commit
d9101a4fe1
@ -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]|1[012])\" \\(Variable: TIME_MON\\)"
|
||||
},
|
||||
"rules":[
|
||||
"SecRuleEngine On",
|
||||
|
Loading…
x
Reference in New Issue
Block a user