Project import/squid - Diff 22ddaea1f2...347e9b343d

view file @ 347e9b343d
... ... --- /dev/null
... ... +++ b/SQUID-2018_1.patch
... ... @@ -0,0 +1,28 @@
1
commit eb2db98a676321b814fc4a51c4fb7928a8bb45d9 (refs/remotes/origin/v3.5)
2
Author: Amos Jeffries <yadij@users.noreply.github.com>
3
Date:   2018-01-19 13:54:14 +1300
4
5
    ESI: make sure endofName never exceeds tagEnd (#130)
6
7
diff --git a/src/esi/CustomParser.cc b/src/esi/CustomParser.cc
8
index d86d2d3..db634d9 100644
9
--- a/src/esi/CustomParser.cc
10
+++ b/src/esi/CustomParser.cc
11
@@ -121,7 +121,7 @@ ESICustomParser::parse(char const *dataToParse, size_t const lengthOfData, bool
12
 
13
             char * endofName = strpbrk(const_cast<char *>(tag), w_space);
14
 
15
-            if (endofName > tagEnd)
16
+            if (!endofName || endofName > tagEnd)
17
                 endofName = const_cast<char *>(tagEnd);
18
 
19
             *endofName = '\0';
20
@@ -214,7 +214,7 @@ ESICustomParser::parse(char const *dataToParse, size_t const lengthOfData, bool
21
 
22
             char * endofName = strpbrk(const_cast<char *>(tag), w_space);
23
 
24
-            if (endofName > tagEnd)
25
+            if (!endofName || endofName > tagEnd)
26
                 endofName = const_cast<char *>(tagEnd);
27
 
28
             *endofName = '\0';
view file @ 347e9b343d
... ... --- /dev/null
... ... +++ b/SQUID-2018_2.patch
... ... @@ -0,0 +1,23 @@
1
commit 8232b83d3fa47a1399f155cb829db829369fbae9 (refs/remotes/origin/v3.5)
2
Author: squidadm <squidadm@users.noreply.github.com>
3
Date:   2018-01-21 08:07:08 +1300
4
5
    Fix indirect IP logging for transactions without a client connection (#129) (#136)
6
7
diff --git a/src/client_side_request.cc b/src/client_side_request.cc
8
index be124f3..203f89d 100644
9
--- a/src/client_side_request.cc
10
+++ b/src/client_side_request.cc
11
@@ -488,9 +488,9 @@ clientFollowXForwardedForCheck(allow_t answer, void *data)
12
         * Ensure that the access log shows the indirect client
13
         * instead of the direct client.
14
         */
15
-        ConnStateData *conn = http->getConn();
16
-        conn->log_addr = request->indirect_client_addr;
17
-        http->al->cache.caddr = conn->log_addr;
18
+        http->al->cache.caddr = request->indirect_client_addr;
19
+        if (ConnStateData *conn = http->getConn())
20
+            conn->log_addr = request->indirect_client_addr;
21
     }
22
     request->x_forwarded_for_iterator.clean();
23
     request->flags.done_follow_x_forwarded_for = true;
... ... --- a/squid.spec
... ... +++ b/squid.spec
... ... @@ -12,7 +12,7 @@
12 12
Summary:	The Squid proxy caching server
13 13
Name:		squid
14 14
Version:	3.5.27
15
Release:	1
15
Release:	2
16 16
License:	GPLv2
17 17
Group:		System/Servers
18 18
Url:		http://www.squid-cache.org/
... ... @@ -39,6 +39,8 @@ Patch13: squid-errordir.diff
39 39
Patch16:	squid-3.5.5-mysql-helper-joomla.diff
40 40
Patch18:	squid-3.5.15-purge.diff
41 41
Patch19:	squid-3.4.9-configure-egrep.patch
42
Patch20:        SQUID-2018_1.patch
43
Patch21:        SQUID-2018_2.patch
42 44
Patch301:	squid-getconf_mess.diff
43 45
BuildRequires:	libtool
44 46
BuildRequires:	samba-client
... ... @@ -310,7 +312,9 @@ done
312 312
%patch13 -p1 -b .errordir
313 313
%patch16 -p1 -b .joomla
314 314
%patch18 -p1 -b .purge-paths
315
%patch20 -p1 -b .ksh
315
%patch19 -p1 -b .egrep
316
%patch20 -p1 -b .SQUID-2018_1
317
%patch21 -p1 -b .SQUID-2018_2
316 318
317 319
mkdir -p faq
318 320
tar -jxf %{SOURCE2} -C faq