Blame SOURCES/squid-3.5.20-CVE-2018-1000027.patch

e6ac7e
commit 8232b83d3fa47a1399f155cb829db829369fbae9 (refs/remotes/origin/v3.5)
e6ac7e
Author: squidadm <squidadm@users.noreply.github.com>
e6ac7e
Date:   2018-01-21 08:07:08 +1300
e6ac7e
e6ac7e
    Fix indirect IP logging for transactions without a client connection (#129) (#136)
e6ac7e
e6ac7e
diff --git a/src/client_side_request.cc b/src/client_side_request.cc
e6ac7e
index be124f3..203f89d 100644
e6ac7e
--- a/src/client_side_request.cc
e6ac7e
+++ b/src/client_side_request.cc
e6ac7e
@@ -488,9 +488,9 @@ clientFollowXForwardedForCheck(allow_t answer, void *data)
e6ac7e
         * Ensure that the access log shows the indirect client
e6ac7e
         * instead of the direct client.
e6ac7e
         */
e6ac7e
-        ConnStateData *conn = http->getConn();
e6ac7e
-        conn->log_addr = request->indirect_client_addr;
e6ac7e
-        http->al->cache.caddr = conn->log_addr;
e6ac7e
+        http->al->cache.caddr = request->indirect_client_addr;
e6ac7e
+        if (ConnStateData *conn = http->getConn())
e6ac7e
+            conn->log_addr = request->indirect_client_addr;
e6ac7e
     }
e6ac7e
     request->x_forwarded_for_iterator.clean();
e6ac7e
     request->flags.done_follow_x_forwarded_for = true;