mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Removed SecDefineRemoteAddr and fixed Apache 2.4 mod_remoteip integration
This commit is contained in:
@@ -272,24 +272,9 @@ static void internal_log_ex(request_rec *r, directory_config *dcfg, modsec_rec *
|
||||
"[client %s] ModSecurity: %s%s [uri \"%s\"]%s", r->useragent_ip ? r->useragent_ip : r->connection->client_ip, str1,
|
||||
hostname, log_escape(msr->mp, r->uri), unique_id);
|
||||
#else
|
||||
if(strcasecmp(msr->txcfg->remote_define, "default") == 0) {
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server,
|
||||
"[client %s] ModSecurity: %s%s [uri \"%s\"]%s", r->connection->remote_ip, str1,
|
||||
hostname, log_escape(msr->mp, r->uri), unique_id);
|
||||
} else {
|
||||
remote = (char *)apr_table_get(msr->r->headers_in, msr->txcfg->remote_define);
|
||||
if(remote == NULL) {
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server,
|
||||
"[client %s] ModSecurity: %s%s [uri \"%s\"]%s", r->connection->remote_ip, str1,
|
||||
hostname, log_escape(msr->mp, r->uri), unique_id);
|
||||
} else {
|
||||
parse_remote = apr_pstrdup(msr->mp, remote);
|
||||
str = apr_strtok(parse_remote, ",", &saved);
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server,
|
||||
"[client %s] ModSecurity: %s%s [uri \"%s\"]%s", str, str1,
|
||||
hostname, log_escape(msr->mp, r->uri), unique_id);
|
||||
}
|
||||
}
|
||||
ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r->server,
|
||||
"[client %s] ModSecurity: %s%s [uri \"%s\"]%s", msr->remote_addr ? msr->remote_addr : r->connection->remote_ip, str1,
|
||||
hostname, log_escape(msr->mp, r->uri), unique_id);
|
||||
#endif
|
||||
|
||||
/* Add this message to the list. */
|
||||
|
Reference in New Issue
Block a user