mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-06 06:16:51 +03:00
Unified messages in the error log and in the audit log.
This commit is contained in:
@@ -488,13 +488,13 @@ static int hook_post_config(apr_pool_t *mp, apr_pool_t *mp_log, apr_pool_t *mp_t
|
|||||||
|
|
||||||
/* Log our presence to the error log. */
|
/* Log our presence to the error log. */
|
||||||
if (first_time) {
|
if (first_time) {
|
||||||
|
ap_log_error(APLOG_MARK, APLOG_NOTICE | APLOG_NOERRNO, 0, s,
|
||||||
|
"%s configured.", MODULE_NAME_FULL);
|
||||||
|
|
||||||
|
/* If we've changed the server signature make note of the original. */
|
||||||
if (new_server_signature != NULL) {
|
if (new_server_signature != NULL) {
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOTICE | APLOG_NOERRNO, 0, s,
|
ap_log_error(APLOG_MARK, APLOG_NOTICE | APLOG_NOERRNO, 0, s,
|
||||||
"ModSecurity for Apache %s (build %s) configured - %s", MODULE_RELEASE, modsec_build(mp_temp), real_server_signature);
|
"Original server signature: %s", real_server_signature);
|
||||||
}
|
|
||||||
else {
|
|
||||||
ap_log_error(APLOG_MARK, APLOG_NOTICE | APLOG_NOERRNO, 0, s,
|
|
||||||
"ModSecurity for Apache %s (build %s) configured", MODULE_RELEASE, modsec_build(mp_temp));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -61,11 +61,11 @@ extern DSOLOCAL modsec_build_type_rec modsec_build_type[];
|
|||||||
#define MODSEC_VERSION_TYPE "dev"
|
#define MODSEC_VERSION_TYPE "dev"
|
||||||
#define MODSEC_VERSION_RELEASE "3"
|
#define MODSEC_VERSION_RELEASE "3"
|
||||||
|
|
||||||
#define MODULE_NAME "ModSecurity"
|
#define MODULE_NAME "ModSecurity for Apache"
|
||||||
#define MODULE_RELEASE \
|
#define MODULE_RELEASE \
|
||||||
MODSEC_VERSION_MAJOR "." MODSEC_VERSION_MINOR "." MODSEC_VERSION_MAINT \
|
MODSEC_VERSION_MAJOR "." MODSEC_VERSION_MINOR "." MODSEC_VERSION_MAINT \
|
||||||
"-" MODSEC_VERSION_TYPE MODSEC_VERSION_RELEASE
|
"-" MODSEC_VERSION_TYPE MODSEC_VERSION_RELEASE
|
||||||
#define MODULE_NAME_FULL MODULE_NAME " v" MODULE_RELEASE " (Apache 2.x)"
|
#define MODULE_NAME_FULL MODULE_NAME "/" MODULE_RELEASE " (http://www.modsecurity.org)"
|
||||||
|
|
||||||
#define PHASE_REQUEST_HEADERS 1
|
#define PHASE_REQUEST_HEADERS 1
|
||||||
#define PHASE_REQUEST_BODY 2
|
#define PHASE_REQUEST_BODY 2
|
||||||
|
@@ -743,7 +743,7 @@ void sec_audit_logger(modsec_rec *msr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Producer */
|
/* Producer */
|
||||||
text = apr_psprintf(msr->mp, "Producer: %s\n", MODULE_NAME_FULL);
|
text = apr_psprintf(msr->mp, "Producer: %s.\n", MODULE_NAME_FULL);
|
||||||
sec_auditlog_write(msr, text, strlen(text));
|
sec_auditlog_write(msr, text, strlen(text));
|
||||||
|
|
||||||
/* Server */
|
/* Server */
|
||||||
|
Reference in New Issue
Block a user