]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4682: ignoring http_access deny when client-first bumping mode is used
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 8 May 2017 05:51:20 +0000 (17:51 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 8 May 2017 05:51:20 +0000 (17:51 +1200)
Squid fails to identify HTTP requests which are tunneled inside an already
established client-first bumped tunnel, and this is results in ignoring
http_access denied for these requests.

This is a Measurement Factory project

src/client_side_request.cc

index 5133c1d302820d5c1c893b8994db4f9744c493d0..129dd3b7f831c2703b802a15b53bf4434cabb4ba 100644 (file)
@@ -1427,7 +1427,17 @@ ClientRequestContext::sslBumpAccessCheck()
     if (bumpMode != Ssl::bumpEnd) {
         debugs(85, 5, HERE << "SslBump already decided (" << bumpMode <<
                "), " << "ignoring ssl_bump for " << http->getConn());
-        if (!http->getConn()->serverBump())
+
+        // We need the following "if" for transparently bumped TLS connection,
+        // because in this case we are running ssl_bump access list before
+        // the doCallouts runs. It can be removed after the bug #4340 fixed.
+        // We do not want to proceed to bumping steps:
+        //  - if the TLS connection with the client is already established
+        //    because we are accepting normal HTTP requests on TLS port,
+        //    or because of the client-first bumping mode
+        //  - When the bumping is already started
+        if (!http->getConn()->switchedToHttps() &&
+                !http->getConn()->serverBump())
             http->sslBumpNeed(bumpMode); // for processRequest() to bump if needed and not already bumped
         http->al->ssl.bumpMode = bumpMode; // inherited from bumped connection
         return false;