mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 11:16:33 +03:00
When there's a problem writing a collection key (it's too big for instance), we have no info on the involved key.
This adds the key name in the log (and its size, as this is the problem most of the time).
This commit is contained in:
@@ -608,8 +608,8 @@ int collection_store(modsec_rec *msr, apr_table_t *col) {
|
||||
|
||||
rc = apr_sdbm_store(dbm, key, value, APR_SDBM_REPLACE);
|
||||
if (rc != APR_SUCCESS) {
|
||||
msr_log(msr, 1, "collection_store: Failed to write to DBM file \"%s\": %s", dbm_filename,
|
||||
get_apr_error(msr->mp, rc));
|
||||
msr_log(msr, 1, "collection_store: Failed to write to DBM file \"%s\": %s (key=%s, length=%d)", dbm_filename,
|
||||
get_apr_error(msr->mp, rc), key.dptr, value.dsize);
|
||||
if (dbm != NULL) {
|
||||
#ifdef GLOBAL_COLLECTION_LOCK
|
||||
apr_sdbm_close(dbm);
|
||||
|
Reference in New Issue
Block a user