mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
Increases the loglevel while failed to delete a collection
One of the reasons that sdbm failed to delete a key is the fact that it may already been excluded). The error logs are not clear regarding that. Check if the key exists prior to delete will generate unecessary computation. This commit increases the loglevel of the error message and makes it acts like the operation was successfully accomplished.
This commit is contained in:
parent
0318b10461
commit
d727acca33
@ -217,14 +217,13 @@ static apr_table_t *collection_retrieve_ex(apr_sdbm_t *existing_dbm, modsec_rec
|
|||||||
|
|
||||||
rc = apr_sdbm_delete(dbm, key);
|
rc = apr_sdbm_delete(dbm, key);
|
||||||
if (rc != APR_SUCCESS) {
|
if (rc != APR_SUCCESS) {
|
||||||
msr_log(msr, 1, "collection_retrieve_ex: Failed deleting collection (name \"%s\", "
|
msr_log(msr, 9, "collection_retrieve_ex: Failed deleting collection (name \"%s\", "
|
||||||
"key \"%s\"): %s", log_escape(msr->mp, col_name),
|
"key \"%s\"): %s (It may already have been excluded).", log_escape(msr->mp, col_name),
|
||||||
log_escape_ex(msr->mp, col_key, col_key_len), get_apr_error(msr->mp, rc));
|
log_escape_ex(msr->mp, col_key, col_key_len), get_apr_error(msr->mp, rc));
|
||||||
msr->msc_sdbm_delete_error = 1;
|
msr->msc_sdbm_delete_error = 1;
|
||||||
goto cleanup;
|
/*goto cleanup;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (existing_dbm == NULL) {
|
if (existing_dbm == NULL) {
|
||||||
apr_sdbm_close(dbm);
|
apr_sdbm_close(dbm);
|
||||||
dbm = NULL;
|
dbm = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user