------------------------------------------------------------ revno: 12599 revision-id: squid3@treenet.co.nz-20130726123437-3ik9p516xx6hb4i0 parent: squid3@treenet.co.nz-20130726123207-0vf01jff4twpi1et fixes bug(s): http://bugs.squid-cache.org/show_bug.cgi?id=3879 author: Martin Stolle committer: Amos Jeffries branch nick: 3.3 timestamp: Fri 2013-07-26 06:34:37 -0600 message: Bug 3879: assertion failed ConnStateData::validatePinnedConnection ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20130726123437-3ik9p516xx6hb4i0 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: 1f1c1197d0ab8743fb7075fd842d0156037b96af # timestamp: 2013-07-26 12:35:43 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20130726123207-\ # 0vf01jff4twpi1et # # Begin patch === modified file 'src/client_side.cc' --- src/client_side.cc 2013-07-26 12:32:07 +0000 +++ src/client_side.cc 2013-07-26 12:34:37 +0000 @@ -4475,18 +4475,14 @@ bool valid = true; if (!Comm::IsConnOpen(pinning.serverConnection)) valid = false; - if (pinning.auth && request && strcasecmp(pinning.host, request->GetHost()) != 0) { - valid = false; - } - if (request && pinning.port != request->port) { - valid = false; - } - if (pinning.peer && !cbdataReferenceValid(pinning.peer)) { - valid = false; - } - if (aPeer != pinning.peer) { - valid = false; - } + else if (pinning.auth && pinning.host && request && strcasecmp(pinning.host, request->GetHost()) != 0) + valid = false; + else if (request && pinning.port != request->port) + valid = false; + else if (pinning.peer && !cbdataReferenceValid(pinning.peer)) + valid = false; + else if (aPeer != pinning.peer) + valid = false; if (!valid) { /* The pinning info is not safe, remove any pinning info */