mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
fix error message
both info->format and fmt (for versions prio 2.4) contain the error message format but not the actual formatted error message
This commit is contained in:
parent
137331748c
commit
e7f029b55a
@ -1144,13 +1144,13 @@ static void hook_error_log(const char *file, int line, int level, apr_status_t s
|
|||||||
em->line = info->line;
|
em->line = info->line;
|
||||||
em->level = info->level;
|
em->level = info->level;
|
||||||
em->status = info->status;
|
em->status = info->status;
|
||||||
if (info->format != NULL) em->message = apr_pstrdup(msr->mp, info->format);
|
em->message = apr_pstrdup(msr->mp, errstr);
|
||||||
#else
|
#else
|
||||||
if (file != NULL) em->file = apr_pstrdup(msr->mp, file);
|
if (file != NULL) em->file = apr_pstrdup(msr->mp, file);
|
||||||
em->line = line;
|
em->line = line;
|
||||||
em->level = level;
|
em->level = level;
|
||||||
em->status = status;
|
em->status = status;
|
||||||
if (fmt != NULL) em->message = apr_pstrdup(msr->mp, fmt);
|
em->message = apr_pstrdup(msr->mp, errstr);
|
||||||
#endif
|
#endif
|
||||||
/* Remove \n from the end of the message */
|
/* Remove \n from the end of the message */
|
||||||
if (em->message != NULL) {
|
if (em->message != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user