Blame SOURCES/squid-CVE-2016-4554.patch

4056b0
------------------------------------------------------------
4056b0
revno: 12698
4056b0
revision-id: squid3@treenet.co.nz-20160502034346-fhtahpk2lfblo2b1
4056b0
parent: squid3@treenet.co.nz-20160420111636-ft1dbd1iuktj8ift
4056b0
committer: Amos Jeffries <squid3@treenet.co.nz>
4056b0
branch nick: 3.3
4056b0
timestamp: Mon 2016-05-02 15:43:46 +1200
4056b0
message:
4056b0
  Require exact match in Host header name lookup
4056b0
------------------------------------------------------------
4056b0
# Bazaar merge directive format 2 (Bazaar 0.90)
4056b0
# revision_id: squid3@treenet.co.nz-20160502034346-fhtahpk2lfblo2b1
4056b0
# target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3
4056b0
# testament_sha1: 6e285b375879d79c870bff268c99ef2597f1b725
4056b0
# timestamp: 2016-05-02 03:50:49 +0000
4056b0
# source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3
4056b0
# base_revision_id: squid3@treenet.co.nz-20160420111636-\
4056b0
#   ft1dbd1iuktj8ift
4056b0
# 
4056b0
# Begin patch
4056b0
=== modified file 'src/mime_header.cc'
4056b0
--- src/mime_header.cc	2012-08-29 12:36:10 +0000
4056b0
+++ src/mime_header.cc	2016-05-02 03:43:46 +0000
4056b0
@@ -62,9 +62,6 @@
4056b0
         if (strcmp(p, "\r\n\r\n") == 0 || strcmp(p, "\n\n") == 0)
4056b0
             return NULL;
4056b0
 
4056b0
-        while (xisspace(*p))
4056b0
-            ++p;
4056b0
-
4056b0
         if (strncasecmp(p, name, namelen))
4056b0
             continue;
4056b0
 
4056b0
4056b0
------------------------------------------------------------
4056b0
revno: 12700
4056b0
revision-id: squid3@treenet.co.nz-20160508124255-w1vb9ifv5affhgai
4056b0
parent: squid3@treenet.co.nz-20160506091321-tza59kjh2g6goob0
4056b0
fixes bug: http://bugs.squid-cache.org/show_bug.cgi?id=4515
4056b0
committer: Amos Jeffries <squid3@treenet.co.nz>
4056b0
branch nick: 3.3
4056b0
timestamp: Mon 2016-05-09 00:42:55 +1200
4056b0
message:
4056b0
  Bug 4515: regression after CVE-2016-4554 patch
4056b0
------------------------------------------------------------
4056b0
# Bazaar merge directive format 2 (Bazaar 0.90)
4056b0
# revision_id: squid3@treenet.co.nz-20160508124255-w1vb9ifv5affhgai
4056b0
# target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3
4056b0
# testament_sha1: 5ff66676035dc7841f6eb610dee8739dc015f29c
4056b0
# timestamp: 2016-05-08 12:50:57 +0000
4056b0
# source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3
4056b0
# base_revision_id: squid3@treenet.co.nz-20160506091321-\
4056b0
#   tza59kjh2g6goob0
4056b0
# 
4056b0
# Begin patch
4056b0
=== modified file 'src/mime_header.cc'
4056b0
--- src/mime_header.cc	2016-05-02 03:43:46 +0000
4056b0
+++ src/mime_header.cc	2016-05-08 12:42:55 +0000
4056b0
@@ -58,10 +58,13 @@
4056b0
 
4056b0
     debugs(25, 5, "mime_get_header: looking for '" << name << "'");
4056b0
 
4056b0
-    for (p = mime; *p; p += strcspn(p, "\n\r")) {
4056b0
-        if (strcmp(p, "\r\n\r\n") == 0 || strcmp(p, "\n\n") == 0)
4056b0
+    for (p = mime; *p; p += strcspn(p, "\n")) {
4056b0
+        if (strcmp(p, "\n\r\n") == 0 || strcmp(p, "\n\n") == 0)
4056b0
             return NULL;
4056b0
 
4056b0
+        if (*p == '\n')
4056b0
+            ++p;
4056b0
+
4056b0
         if (strncasecmp(p, name, namelen))
4056b0
             continue;
4056b0
 
4056b0