mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Fix the variable resolution duration (Issue #662)
apr_time_usec is apparently defined as follows: Which leads DURATION to not behave as expected when duration exceeds one second.
This commit is contained in:
committed by
Felipe Zimmerle
parent
6d458be8ca
commit
3044ad012b
@@ -1828,7 +1828,7 @@ static int var_duration_generate(modsec_rec *msr, msre_var *var, msre_rule *rule
|
||||
|
||||
rvar = apr_pmemdup(mptmp, var, sizeof(msre_var));
|
||||
rvar->value = apr_psprintf(mptmp, "%" APR_TIME_T_FMT,
|
||||
(apr_time_usec(apr_time_now() - msr->r->request_time)));
|
||||
(apr_time_now() - msr->r->request_time));
|
||||
rvar->value_len = strlen(rvar->value);
|
||||
apr_table_addn(vartab, rvar->name, (void *)rvar);
|
||||
|
||||
|
Reference in New Issue
Block a user