mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
Add IS_NEW and IS_EXPIRED collection variables. See #345.
This commit is contained in:
@@ -1322,6 +1322,22 @@ static apr_status_t init_collection(modsec_rec *msr, const char *real_col_name,
|
||||
var->value = "0";
|
||||
var->value_len = strlen(var->value);
|
||||
apr_table_setn(table, var->name, (void *)var);
|
||||
|
||||
/* This is a new collection. */
|
||||
var = apr_pcalloc(msr->mp, sizeof(msc_string));
|
||||
var->name = "IS_NEW";
|
||||
var->name_len = strlen(var->name);
|
||||
var->value = "1";
|
||||
var->value_len = strlen(var->value);
|
||||
apr_table_setn(table, var->name, (void *)var);
|
||||
|
||||
/* It has not yet expired. */
|
||||
var = apr_pcalloc(msr->mp, sizeof(msc_string));
|
||||
var->name = "IS_EXPIRED";
|
||||
var->name_len = strlen(var->name);
|
||||
var->value = "0";
|
||||
var->value_len = strlen(var->value);
|
||||
apr_table_setn(table, var->name, (void *)var);
|
||||
}
|
||||
|
||||
/* Add the collection to the list. */
|
||||
|
Reference in New Issue
Block a user