]> granicus.if.org Git - apache/commitdiff
Merge r1564052 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 17 Feb 2014 14:12:30 +0000 (14:12 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 17 Feb 2014 14:12:30 +0000 (14:12 +0000)
Correct the trusted proxy match test in mod_remoteip. PR 54651.\n\nSubmitted By: Yoshinori Ehara <yoshinori ehara gmail com>\nEndorsed By: Eugene L <eugenel amazon com>\nCommited By: mrumph
Submitted by: mrumph
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1569006 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/metadata/mod_remoteip.c

diff --git a/CHANGES b/CHANGES
index bce90641946af17a236e4086eb0c79e13b50c0e6..b112bc36ac322e79eafdb32719b8a00d700f5795 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.8
 
+  *) mod_remoteip: Correct the trusted proxy match test. PR 54651.
+     [Yoshinori Ehara <yoshinori ehara gmail com>, Eugene L <eugenel amazon com>]
+
   *) mod_remoteip: Use the correct IP addresses to populate the proxy_ips field.
      PR 55972. [Mike Rumph]
 
index 029d8226c33e8ab8a96c9781424d2faa098d90e2..61087590ec734b8cc813b38ca2cf7f35dca99800 100644 (file)
@@ -246,14 +246,14 @@ static int remoteip_modify_request(request_rec *r)
 
     while (remote) {
 
-        /* verify c->client_addr is trusted if there is a trusted proxy list
+        /* verify user agent IP against the trusted proxy list
          */
         if (config->proxymatch_ip) {
             int i;
             remoteip_proxymatch_t *match;
             match = (remoteip_proxymatch_t *)config->proxymatch_ip->elts;
             for (i = 0; i < config->proxymatch_ip->nelts; ++i) {
-                if (apr_ipsubnet_test(match[i].ip, c->client_addr)) {
+                if (apr_ipsubnet_test(match[i].ip, temp_sa)) {
                     internal = match[i].internal;
                     break;
                 }