mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-15 07:57:10 +03:00
MODSEC-160
This commit is contained in:
@@ -1730,7 +1730,7 @@ static apr_status_t init_collection(modsec_rec *msr, const char *real_col_name,
|
||||
|
||||
if (table == NULL) {
|
||||
/* Does not exist yet - create new. */
|
||||
|
||||
|
||||
if (msr->txcfg->debuglog_level >= 4) {
|
||||
msr_log(msr, 4, "Creating collection (name \"%s\", key \"%s\").",
|
||||
real_col_name, col_key);
|
||||
@@ -1741,11 +1741,15 @@ static apr_status_t init_collection(modsec_rec *msr, const char *real_col_name,
|
||||
|
||||
/* IMP1 Is the timeout hard-coded to 3600? */
|
||||
|
||||
if(msr->txcfg->debuglog_level >= 4) {
|
||||
msr_log(msr, 4, "Setting default timeout collection value %d.",msr->txcfg->col_timeout);
|
||||
}
|
||||
|
||||
/* Add default timeout. */
|
||||
var = (msc_string *)apr_pcalloc(msr->mp, sizeof(msc_string));
|
||||
var->name = "__expire_KEY";
|
||||
var->name_len = strlen(var->name);
|
||||
var->value = apr_psprintf(msr->mp, "%" APR_TIME_T_FMT, (apr_time_t)(apr_time_sec(msr->request_time) + 3600));
|
||||
var->value = apr_psprintf(msr->mp, "%" APR_TIME_T_FMT, (apr_time_t)(apr_time_sec(msr->request_time) + msr->txcfg->col_timeout));
|
||||
var->value_len = strlen(var->value);
|
||||
apr_table_setn(table, var->name, (void *)var);
|
||||
|
||||
@@ -1761,7 +1765,7 @@ static apr_status_t init_collection(modsec_rec *msr, const char *real_col_name,
|
||||
var = apr_pcalloc(msr->mp, sizeof(msc_string));
|
||||
var->name = "TIMEOUT";
|
||||
var->name_len = strlen(var->name);
|
||||
var->value = apr_psprintf(msr->mp, "%d", 3600);
|
||||
var->value = apr_psprintf(msr->mp, "%d", msr->txcfg->col_timeout);
|
||||
var->value_len = strlen(var->value);
|
||||
apr_table_setn(table, var->name, (void *)var);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user