From deb6a816b4551131691c7de6a87f0d53c822d43c Mon Sep 17 00:00:00 2001 From: brectanus Date: Tue, 2 Sep 2008 23:43:15 +0000 Subject: [PATCH] Fixed MODSEC-2 by using the msr->hostname (ap_get_server_name(r)) vs r->hostname in the log. --- apache2/apache2_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache2/apache2_util.c b/apache2/apache2_util.c index bc3a5e89..569bf201 100644 --- a/apache2/apache2_util.c +++ b/apache2/apache2_util.c @@ -286,7 +286,7 @@ void internal_log(request_rec *r, directory_config *dcfg, modsec_rec *msr, /* Send message levels 1-3 to the Apache error log too. */ if (level <= 3) { char *unique_id = (char *)get_env_var(r, "UNIQUE_ID"); - char *hostname = (char *)r->hostname; + char *hostname = (char *)msr->hostname; if (unique_id != NULL) { unique_id = apr_psprintf(msr->mp, " [unique_id \"%s\"]",