mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +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;
|
struct tm timeinfo;
|
||||||
localtime_r(&timer, &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,
|
l->push_back(new VariableValue(&m_retName,
|
||||||
&transaction->m_variableTimeMin));
|
&transaction->m_variableTimeMin));
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"expected":{
|
"expected":{
|
||||||
"debug_log":"Target value: \"([0-9]+)\" \\(Variable: TIME_MON\\)"
|
"http_code": 200,
|
||||||
|
"debug_log":"Target value: \"[1-9][012]?\" \\(Variable: TIME_MON\\)"
|
||||||
},
|
},
|
||||||
"rules":[
|
"rules":[
|
||||||
"SecRuleEngine On",
|
"SecRuleEngine On",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user