]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
7 years agoBug 4169: HIT marked as MISS when If-None-Match does not match v3.1
Garri Djavadyan [Sat, 17 Dec 2016 13:56:49 +0000 (02:56 +1300)] 
Bug 4169: HIT marked as MISS when If-None-Match does not match

7 years agoBug 3379: Combination of If-Match and a Cache Hit result in TCP Connection Failure
Garri Djavadyan [Sat, 17 Dec 2016 13:23:05 +0000 (02:23 +1300)] 
Bug 3379: Combination of If-Match and a Cache Hit result in TCP Connection Failure

8 years agoBug 4515: regression after CVE-2016-4554 patch
Amos Jeffries [Sun, 8 May 2016 12:45:29 +0000 (00:45 +1200)] 
Bug 4515: regression after CVE-2016-4554 patch

8 years agoRequire exact match in Host header name lookup
Amos Jeffries [Mon, 2 May 2016 04:09:37 +0000 (16:09 +1200)] 
Require exact match in Host header name lookup

8 years agopinger: Fix buffer overflow in Icmp6::Recv
Yuriy M. Kaminskiy [Wed, 30 Mar 2016 14:47:53 +0000 (03:47 +1300)] 
pinger: Fix buffer overflow in Icmp6::Recv

8 years agoDo not blindly forward cache peer CONNECT responses.
Alex Rousskov [Thu, 30 Jul 2015 03:51:08 +0000 (20:51 -0700)] 
Do not blindly forward cache peer CONNECT responses.

Squid blindly forwards cache peer CONNECT responses to clients. This
may break things if the peer responds with something like HTTP 403
(Forbidden) and keeps the connection with Squid open:
  -  The client application issues a CONNECT request.
  -  Squid forwards this request to a cache peer.
  -  Cache peer correctly responds back with a "403 Forbidden".
  -  Squid does not parse cache peer response and
     just forwards it as if it was a Squid response to the client.
  -  The TCP connections are not closed.

At this stage, Squid is unaware that the CONNECT request has failed. All
subsequent requests on the user agent TCP connection are treated as
tunnelled traffic. Squid is forwarding these requests to the peer on the
TCP connection previously used for the 403-ed CONNECT request, without
proper processing. The additional headers which should have been applied
by Squid to these requests are not applied, and the requests are being
forwarded to the cache peer even though the Squid configuration may
state that these requests must go directly to the origin server.

This fixes Squid to parse cache peer responses, and if an error response
found, respond with "502 Bad Gateway" to the client and close the
connections.

 Backport by RaphaĆ«l Hertzog based on original work by Alex Rousskov

8 years agoFix backport error in rev.10490
Amos Jeffries [Fri, 12 Jun 2015 03:32:40 +0000 (20:32 -0700)] 
Fix backport error in rev.10490

9 years agoDocs: Update CONTRIBUTORS
Source Maintenance [Thu, 23 Apr 2015 13:25:24 +0000 (13:25 +0000)] 
Docs: Update CONTRIBUTORS

9 years agoRelease Notes updates
Amos Jeffries [Wed, 18 Feb 2015 10:45:44 +0000 (02:45 -0800)] 
Release Notes updates

9 years agoFix various ICMP handling issues in Squid pinger
Amos Jeffries [Mon, 15 Sep 2014 05:09:19 +0000 (23:09 -0600)] 
Fix various ICMP handling issues in Squid pinger

* ICMP code type logging display could over-read the registered type
  string arrays.

* Malformed ICMP packets were accepted into processing with undefined
  and potentially nasty results.

Both sets of flaws can result in pinger segmentation fault and halting
the Squid functionality relying on pinger for correct operation.

 Thanks to the OpenSUSE project for analysis and resolution of these.

9 years agoFix off by one in SNMP subsystem
Sebastian Krahmer [Mon, 15 Sep 2014 05:01:15 +0000 (23:01 -0600)] 
Fix off by one in SNMP subsystem

9 years agoIgnore Range headers with unidentifiable byte-range values
Amos Jeffries [Wed, 27 Aug 2014 14:40:59 +0000 (08:40 -0600)] 
Ignore Range headers with unidentifiable byte-range values

If squid is unable to determine the byte value for ranges, treat the
header as invalid.

10 years agoProtect against buffer overrun in DNS query generation SQUID_3_3_9
Nathan Hoad [Wed, 10 Jul 2013 12:47:48 +0000 (06:47 -0600)] 
Protect against buffer overrun in DNS query generation

see SQUID-2013:2.

This bug has been present as long as the internal DNS component however
most code reaching this point is passing through URL validation first.
With Squid-3.2 Host header verification using DNS directly we may have
problems.

11 years agoBug 3790: cachemgr.cgi crash with authentication
Reinhard Sojka [Fri, 22 Feb 2013 11:13:25 +0000 (04:13 -0700)] 
Bug 3790: cachemgr.cgi crash with authentication

11 years ago3.1.23 SQUID_3_1_23
Amos Jeffries [Wed, 9 Jan 2013 02:15:03 +0000 (19:15 -0700)] 
3.1.23

11 years agoAnother piece of SQUID-2012:1
Eygene Ryabinkin [Tue, 8 Jan 2013 23:11:51 +0000 (16:11 -0700)] 
Another piece of SQUID-2012:1

11 years agoAdditional pieces of SQUID-2012:1
Amos Jeffries [Tue, 1 Jan 2013 05:29:43 +0000 (22:29 -0700)] 
Additional pieces of SQUID-2012:1

11 years ago3.1.22 SQUID_3_1_22
Amos Jeffries [Sun, 2 Dec 2012 10:01:09 +0000 (03:01 -0700)] 
3.1.22

11 years agoAdditional fix on rev.10479 for freeing const buffer
Amos Jeffries [Fri, 30 Nov 2012 14:07:48 +0000 (07:07 -0700)] 
Additional fix on rev.10479 for freeing const buffer

11 years agoBug 3685: Squid hangs in ClassCBucket::update
Amos Jeffries [Fri, 30 Nov 2012 13:36:45 +0000 (06:36 -0700)] 
Bug 3685: Squid hangs in ClassCBucket::update

11 years agocachemgr.cgi: Memory Leaks and DoS Vulnerability
Amos Jeffries [Thu, 29 Nov 2012 11:30:12 +0000 (04:30 -0700)] 
cachemgr.cgi: Memory Leaks and DoS Vulnerability

* Ignore invalid Content-Length headers.

* Limit received POST requests to 4KB and discard the rest.

* Authentication credentials parser also leaks badly.

 Detected by Coverity Scan.
 Issues 740380, 740443, 740444, 740442, 740487, 740446, 740445

11 years agoBug 3189: AIO thread race on pipe() initialization
Amos Jeffries [Thu, 29 Nov 2012 11:28:05 +0000 (04:28 -0700)] 
Bug 3189: AIO thread race on pipe() initialization

11 years agoBug 3659: read_timeout problem with HTTPS
Jean-Philippe Menil [Mon, 26 Nov 2012 11:06:26 +0000 (04:06 -0700)] 
Bug 3659: read_timeout problem with HTTPS

11 years agoBug 3654: Fix IPv6 enabled squidclient
Henrik Nordstrom [Tue, 6 Nov 2012 03:31:20 +0000 (20:31 -0700)] 
Bug 3654: Fix IPv6 enabled squidclient

Was failing with assertion failure due to IPv6 support not being probed
automatically.

11 years ago3.1.21 SQUID_3_1_21
Amos Jeffries [Sun, 23 Sep 2012 13:58:44 +0000 (07:58 -0600)] 
3.1.21

11 years agoBug 3615: configure check for default max number of FDs is broken
Amos Jeffries [Sun, 23 Sep 2012 07:20:45 +0000 (01:20 -0600)] 
Bug 3615: configure check for default max number of FDs is broken

11 years agoBug 3622: peerClearRRStart scheduling multiple events
Amos Jeffries [Sun, 23 Sep 2012 07:13:20 +0000 (01:13 -0600)] 
Bug 3622: peerClearRRStart scheduling multiple events

11 years agoMacOS: fix AddrInfo default flags
Amos Jeffries [Sun, 23 Sep 2012 06:56:36 +0000 (00:56 -0600)] 
MacOS: fix AddrInfo default flags

11 years agoFix build with GCC 4.7 (and probably other C++11 compilers).
Dmitry Kurochkin [Sun, 23 Sep 2012 06:30:14 +0000 (00:30 -0600)] 
Fix build with GCC 4.7 (and probably other C++11 compilers).

User-defined literals introduced by C++11 break some previously valid
code, resulting in errors when building with GCC v4.7. For example:

  error: unable to find string literal operator 'operator"" PRIu64'

In particular, whitespace is now needed after a string literal and
before something that could be a valid user-defined literal.  See
"User-defined literals and whitespace" section at [1] for more details.

The patch adds spaces between string literals and macros.

[1] http://gcc.gnu.org/gcc-4.7/porting_to.html

11 years agoBug 3607: --enable-auth documented default action incorrect
Amos Jeffries [Tue, 7 Aug 2012 23:34:10 +0000 (17:34 -0600)] 
Bug 3607: --enable-auth documented default action incorrect

11 years agoSkip Failure Ratio calculations entirely when ICP is disabled.
Amos Jeffries [Thu, 2 Aug 2012 11:44:57 +0000 (05:44 -0600)] 
Skip Failure Ratio calculations entirely when ICP is disabled.

Also, mention ICP in the logged error message. unqualified 'HIT' confuses
people (self included) more familiar with the HTTP type of HIT responses.

11 years agoSupport -DFAILURE_MODE_TIME=n compiler flag
Amos Jeffries [Thu, 2 Aug 2012 11:43:53 +0000 (05:43 -0600)] 
Support -DFAILURE_MODE_TIME=n compiler flag

This value determins at compile-time how long Squid spends in HIT-only
mode after the failure ratio goes over 1.0. see checkFailureRatio() in
src/client_side_request.cc for details on the ratio.

This flag is supported to remove the need for patching when alteration
is required.

11 years agoBug 3568: Consolidate external_acl_form config dumping a bit and add missing percent...
Robert Collins [Thu, 2 Aug 2012 11:43:02 +0000 (05:43 -0600)] 
Bug 3568: Consolidate external_acl_form config dumping a bit and add missing percent dumper.

11 years agoBug 3593: socket failure: Address family not supported by protocol
Amos Jeffries [Thu, 2 Aug 2012 11:39:08 +0000 (05:39 -0600)] 
Bug 3593: socket failure: Address family not supported by protocol

11 years agoBug 3584: Detection of setresuid() is broken
Ole Christensen [Thu, 2 Aug 2012 11:37:05 +0000 (05:37 -0600)] 
Bug 3584: Detection of setresuid() is broken

11 years agoSilence IOS 15.1 unknown capabilities messages.
Amos Jeffries [Thu, 2 Aug 2012 11:29:23 +0000 (05:29 -0600)] 
Silence IOS 15.1 unknown capabilities messages.

Its nice to know when new capabilities are added.
But we don't need to report after being informed about them.

TODO: reduce the message to once every thousand or so.
  But be careful to identify what different type numbers exist.

11 years agoRelease Notes: update CONTRIBUTORS to match patch authors list
Amos Jeffries [Sat, 28 Jul 2012 05:56:42 +0000 (23:56 -0600)] 
Release Notes: update CONTRIBUTORS to match patch authors list

11 years agoFix 'expected initializer before STUB_RETVAL'
Amos Jeffries [Sat, 21 Jul 2012 04:16:24 +0000 (22:16 -0600)] 
Fix 'expected initializer before STUB_RETVAL'

11 years agoAccount for Store disk client quota when bandwidth-limiting the server.
Alex Rousskov [Sat, 21 Jul 2012 04:12:30 +0000 (22:12 -0600)] 
Account for Store disk client quota when bandwidth-limiting the server.

It is not clear why the store client type matters when
MemObject::mostBytesAllowed() is trying to find the maximum delay pool
quota for reading from the next hop HTTP server.  Whether the client(s)
are reading from disk or RAM, the corresponding server-side bandwidth
ought to be limited.

This code was removed as a part of bug 3462 investigation, but it is not
needed to fix bug 3462.

11 years agoBug 3462: Delay Pools and ICAP
Julien Pinon [Sat, 21 Jul 2012 04:05:25 +0000 (22:05 -0600)] 
Bug 3462: Delay Pools and ICAP

Allow StoreEntry::bytesWanted() API to ignore delay pools. Use that
feature when shoveling adapted response body from ICAP/eCAP BodyPipe
into Store.

If we do not ignore delay pools in
ServerStateData::handleMoreAdaptedBodyAvailable() context, and our pool
quota is exhausted, we will stop reading from the adaptation BodyPipe,
but there is no code/API to notify a BodyPipe reader when the quota
becomes available again.  With no reads from the pipe, the ICAP service
stops sending more adapted body data and possibly stops reading the
virgin body data from Squid, resulting in a stuck ICAP RESPMOD and the
master HTTP transaction.

We do need to call StoreEntry::bytesWanted() in this context because
otherwise Squid may run out of RAM (Squid bug #2619). The fix for that
problem inadvertently created this bug when delay pools were enabled.

Long-term, a "kick BodyPipe consumer when there is quota" code should be
added, and delay pools should be enabled for ICAP responses, but with
enough knobs for admins to disable ICAP pooling where needed. Most ICAP
environments will probably want to disable bandwidth controls because
ICAP service traffic is usually "local".

Removed StoreEntry::bytesWanted() TRY_FWD_HDR_WAIT guard that disabled
delay pool application until the final HTTP response headers are
received (HttpStateData::haveParsedReplyHeaders() is called). Nobody
could fully explain why that condition was really needed (and we
obviously want to limit bandwidth consumption at all response processing
stages, in general). The now-removed guard was bypassing delay pool
checks for virgin HTTP response (until the ICAP server responded with
adapted headers), causing bandwidth overuse.

Possibly fixes or helps with Squid bug #2606 as well.

11 years agoBug 2976: squid reports ERR_INVALID_URL for transparently captured requests when...
Christos Tsantilas [Sat, 21 Jul 2012 03:50:06 +0000 (21:50 -0600)] 
Bug 2976: squid reports ERR_INVALID_URL for transparently captured requests when reconfiguring

During reconfigure the configured port config objects in http_port_list
may deleted so it is not safe to use them while processing Http requests.
For this reason inside prepareTransparentURL (file client_side.cc) function
the protocol was hard-coded to "http" instead of read it from the related
port config object.
But this is breaks the intercepted https traffic.

This patch:
  1. Inside prepareTransparentURL read the protocol from the related
     port config object
  2. add_http_port() locks the new port pointer before linking it.
  3. parse_*() locks the new port pointer before linking it.
  4. free_*() unlocks the old port pointer before unlinking
     it. It does not delete the old pointer.

This patch also discussed in squid-dev user mailing list in
 "Re: [PATCH] Squid host rewrite for intercepted https requests"
thread.

This is a Measurement Factory project

11 years agoBug 3484: Docs: sslproxy_cert_error example flawed
Guy Helmer [Sat, 21 Jul 2012 03:39:52 +0000 (21:39 -0600)] 
Bug 3484: Docs: sslproxy_cert_error example flawed

This is still far from perfect because dstdomain is not really a FAST ACL
either: Its documentation says that it becomes slow on IP addresses.

11 years agoBug 3133: better fix: Memory leak handling requests for sites that don't exist
Alex Rousskov [Wed, 4 Jul 2012 03:27:59 +0000 (21:27 -0600)] 
Bug 3133: better fix: Memory leak handling requests for sites that don't exist

11 years agoBug 3564: eCAP not supporting CoAP URI schemes
Amos Jeffries [Tue, 19 Jun 2012 07:37:37 +0000 (01:37 -0600)] 
Bug 3564: eCAP not supporting CoAP URI schemes

11 years ago3.1.20 SQUID_3_1_20
Amos Jeffries [Fri, 8 Jun 2012 11:19:27 +0000 (05:19 -0600)] 
3.1.20

11 years agoBug 3013: segmentation fault on shutdown commSetCloseOnExec at comm.cc:1889
Christos Tsantilas [Tue, 5 Jun 2012 09:10:03 +0000 (03:10 -0600)] 
Bug 3013: segmentation fault on shutdown commSetCloseOnExec at comm.cc:1889

11 years agoBug 3233: Invalid URL accepted with url host is white spaces
Amos Jeffries [Tue, 5 Jun 2012 09:08:03 +0000 (03:08 -0600)] 
Bug 3233: Invalid URL accepted with url host is white spaces

11 years agoBug 3074: Improper URL handling with empty path (RFC 3986)
Fyodor [Tue, 5 Jun 2012 09:06:55 +0000 (03:06 -0600)] 
Bug 3074: Improper URL handling with empty path (RFC 3986)

11 years agoBug 3463: dnsserver fails to compile
Christos Tsantilas [Tue, 5 Jun 2012 09:02:11 +0000 (03:02 -0600)] 
Bug 3463: dnsserver fails to compile

11 years agoBug 3390: Proxy auth data visible to scripts
Francesco Chemolli [Tue, 5 Jun 2012 08:22:47 +0000 (02:22 -0600)] 
Bug 3390: Proxy auth data visible to scripts

11 years agoExtend g++ compatibility for extern inline functions
Francesco Chemolli [Tue, 5 Jun 2012 08:20:20 +0000 (02:20 -0600)] 
Extend g++ compatibility for extern inline functions

11 years agoBug 3545: FreeBSD dnsserver segfaults
Marcin Wisnicki [Wed, 30 May 2012 06:09:55 +0000 (00:09 -0600)] 
Bug 3545: FreeBSD dnsserver segfaults

11 years agoBug 3466: Adaptation stuck on last single-byte body piece
Alex Rousskov [Tue, 29 May 2012 11:35:09 +0000 (05:35 -0600)] 
Bug 3466: Adaptation stuck on last single-byte body piece

Changed StoreEntry::bytesWanted(range) to return range.end when the entry can
accommodate range.end bytes. This makes it possible to use that method for
single-byte ranges. Old code returned zero for such ranges, which was
difficult to distinguish from situations where no bytes were wanted at all.

TODO: The StoreEntry::bytesWanted(range) API is left undocumented because it
seems to be slightly broken and/or inconsistent with callers and with the
DelayId::bytesWanted(min, max) API. AFAICT, we should convert
StoreEntry::bytesWanted API from range-based to min/max-based or even just
max-based.

Store Entry API does not use the lower end of the range (except for the
now-removed assertion that the range is not empty). I suspect that Store API
was meant to be used with (first, last+1) "byte position" parameters (returning
the number of bytes wanted) while the DelayId API was meant to be used with
(min, max) "number of bytes" parameters.  However, StoreEntry::bytesWanted
implementation does not follow this assumption so perhaps my speculation is
wrong and there are more problems, including this change.

12 years agoBug 3539: CONNECT server connection not closed correctly on errors
Chao [Mon, 30 Apr 2012 06:15:37 +0000 (00:15 -0600)] 
Bug 3539: CONNECT server connection not closed correctly on errors

12 years agoBug 3133: Memory leak handling requests for sites that don't exist
Stefan Fritsch [Fri, 20 Apr 2012 10:36:06 +0000 (04:36 -0600)] 
Bug 3133: Memory leak handling requests for sites that don't exist

12 years agoBug 3504: Regression: clientside_tos fails to mark traffic
Amos Jeffries [Fri, 23 Mar 2012 03:37:46 +0000 (21:37 -0600)] 
Bug 3504: Regression: clientside_tos fails to mark traffic

revison squid-3.1-10302 removing clientside_tos was a mistake.
The actual problem was portage of ssl_bump access control wrongly
dropping the clientside_tos_done flag.

clientside_mark is the 3.2-only directive.

12 years agoFix URL schemes out of sync
Amos Jeffries [Fri, 23 Mar 2012 03:22:25 +0000 (21:22 -0600)] 
Fix URL schemes out of sync

testURLScheme.cc:115:Assertion
Test name: testURLScheme::testConst_str
equality assertion failed
- Expected: wais
- Actual  : icp

12 years agoAnyP is a 3.2-only namespace
Amos Jeffries [Fri, 16 Mar 2012 14:20:57 +0000 (08:20 -0600)] 
AnyP is a 3.2-only namespace

12 years agoSupport CoAP over HTTP
Amos Jeffries [Fri, 16 Mar 2012 06:19:24 +0000 (00:19 -0600)] 
Support CoAP over HTTP

Make Squid happy with HTTP requests using coap:// and coaps:// URI.

No gateway or other interaction with CoAP is enabled by this patch.

12 years agoBug 3263: ssl_crtd: undefined references to squid_curtime
Alex Rousskov [Fri, 16 Mar 2012 06:12:44 +0000 (00:12 -0600)] 
Bug 3263: ssl_crtd: undefined references to squid_curtime

12 years agoBug 3439: correct external_acl_type documented default for ipv4/ipv6 option
Amos Jeffries [Fri, 16 Mar 2012 06:07:26 +0000 (00:07 -0600)] 
Bug 3439: correct external_acl_type documented default for ipv4/ipv6 option

12 years agoFix closePipesSafely. It is a 3.2 feature
Amos Jeffries [Fri, 16 Mar 2012 05:21:37 +0000 (23:21 -0600)] 
Fix closePipesSafely. It is a 3.2 feature

12 years agoRevert rev10436. Correct patch already applied in 3.1.19
Amos Jeffries [Wed, 7 Mar 2012 01:35:59 +0000 (18:35 -0700)] 
Revert rev10436. Correct patch already applied in 3.1.19

12 years agoBug 3420: part 2: Request body consumption races and theConsumer
Alex Rousskov [Wed, 7 Mar 2012 01:14:42 +0000 (18:14 -0700)] 
Bug 3420: part 2: Request body consumption races and theConsumer

12 years agoBetter helper-to-Squid buffer size management.
Alex Rousskov [Wed, 7 Mar 2012 01:09:59 +0000 (18:09 -0700)] 
Better helper-to-Squid buffer size management.

The minimum buffer size is reduced from 8KB to 4KB after a squid-dev
discussion to prevent wasting of "several hundred KB of unused permanent
memory on some installations".

We now increase the buffer if we cannot parse the helper response message.

The maximum buffer size is now 32KB. This should be enough for all known
helper responses.

We now warn if the read buffer reaches its capacity and kill the offending
helper explicitly. An increase in maximum buffer capacity to 32KB should make
such events rare.

Motivation: ssl_crtd helper may produce responses exceeding 9907 bytes in size
(and possibly much larger if multiple chained certificates need to be returned
to Squid). The old helper.cc code would fill the read buffer completely,
schedule a read for zero bytes, receive zero bytes, declare an EOF condition,
and close the stream (which kills ssl_crtd).  Due to insufficient information
logged, the observable symptoms were pretty much the same as if ssl_crtd
closed the stream first, indicating a ssl_crtd bug.

12 years agoSupport for 3.2 error template codes
Amos Jeffries [Sun, 4 Mar 2012 06:34:39 +0000 (23:34 -0700)] 
Support for 3.2 error template codes

12 years agoTranslations: Sync with 3.2
Various Translators [Sun, 4 Mar 2012 06:13:18 +0000 (23:13 -0700)] 
Translations: Sync with 3.2

12 years agoRegression: snmp/udp address directives not resolving hostname
Amos Jeffries [Sat, 3 Mar 2012 23:56:47 +0000 (16:56 -0700)] 
Regression: snmp/udp address directives not resolving hostname

12 years agoBug 3502: client timeout uses server-side read_timeout, not request_timeout
HONDA Hirofumi [Sat, 3 Mar 2012 23:50:50 +0000 (16:50 -0700)] 
Bug 3502: client timeout uses server-side read_timeout, not request_timeout

Also adjusts request_timeout description in squid.conf to clarify that
request_timeout applies to receiving complete HTTP request headers and not
just the first header byte or body. We reset the connection timeout to
clientLifetimeTimeout after parsing request headers.

https_port was correctly using Config.Timeout.request already.

12 years ago3.1.19 SQUID_3_1_19
Amos Jeffries [Sun, 5 Feb 2012 11:51:07 +0000 (04:51 -0700)] 
3.1.19

12 years agoPrep for 3.1.19
Amos Jeffries [Sun, 5 Feb 2012 11:46:03 +0000 (04:46 -0700)] 
Prep for 3.1.19

12 years agoBug 3441: part 2: Prevent further cache size corruption of swap.state
Alex Rousskov [Sun, 5 Feb 2012 07:31:45 +0000 (00:31 -0700)] 
Bug 3441: part 2: Prevent further cache size corruption of swap.state

12 years agoBug 3441: Part 1: Minimize cache size corruption by malformed swap.state.
Alex Rousskov [Sat, 4 Feb 2012 05:46:26 +0000 (22:46 -0700)] 
Bug 3441: Part 1: Minimize cache size corruption by malformed swap.state.

If swap.state gets corrupted, a single entry with bogus size value will screw
up Squid idea of the current cache size. A newly added StoreSwapLogData sane()
method attempts to minimize the chance of corruption by ignoring log entries
with obviously bogus values.

However, without expensive size checks (-S or "Does the log entry matches the
actual cache file size?"), it is not possible to reliably detect all bogus log
entries.

If Squid gets a wrong idea of the current cache size, it may either cache too
much (and possibly run out of space) OR delete everything.

12 years agoGCC 4.7 SSL fix
Jiri Skala [Wed, 1 Feb 2012 07:55:01 +0000 (00:55 -0700)] 
GCC 4.7 SSL fix

12 years agoBug 3470: GCC 4.7
Amos Jeffries [Wed, 1 Feb 2012 07:53:53 +0000 (00:53 -0700)] 
Bug 3470: GCC 4.7

12 years agoBug 3370: external ACL sometimes skipping
Amos Jeffries [Wed, 1 Feb 2012 07:44:49 +0000 (00:44 -0700)] 
Bug 3370: external ACL sometimes skipping

Emit tag/user/log/message/pass details to the request in the case where
the external ACL entry has expired but within graceful revalidate period.

The result of this bug appears as incorrect matches later down the ACL
processing in any config relying on the external ACL output values.
Example; for bypassing auth login, or for filtering tagged traffic.

12 years agoDo not add HTTP 110 and 111 Warnings to TCP_REFRESH_UNMODIFIED responses.
Alex Rousskov [Sat, 21 Jan 2012 01:16:48 +0000 (18:16 -0700)] 
Do not add HTTP 110 and 111 Warnings to TCP_REFRESH_UNMODIFIED responses.

The old "stale if hit" logic did not account for cases where the stored
stale response became fresh due to a successful revalidation with the
origin server.
When the stored response was stale at the time of the request, we were
adding 110 "Response is stale" and even 111 "Revalidation failed"
Warning headers to responses while logging TCP_REFRESH_UNMODIFIED, which
is considered a hit.

12 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 14 Jan 2012 20:47:40 +0000 (13:47 -0700)] 
SourceFormat Enforcement

12 years agoBug 3420: Request body consumption races and !theConsumer exception.
Alex Rousskov [Sat, 14 Jan 2012 07:19:41 +0000 (00:19 -0700)] 
Bug 3420: Request body consumption races and !theConsumer exception.

Also fixes endless waiting for HTTP client to send req body we no longer need.

Before these changes, the client side used a single "closing" state to
handle two different error conditions:

  1. We stopped receiving request body because of some error.
  2. We stopped sending response because of some error.

When a "directional" error occurred, we try to keep the transaction going in
the other direction (e.g., to give ICAP the entire request or to give HTTP
client the entire response). However, because there was just one "closing"
state, the code failed to correctly detect or process many corner cases,
resulting in stuck transactions and !theConsumer assertions/exceptions due to
races between enableAutoConsumption() and expectNoConsumption() calls.

This patch replaces the "closing" state with two direction-specific "we
stopped sending/receiving" flags.

Now, when the response sending code is done, it now checks whether the
receiving code stopped and closes the connection as needed. This is done both
when we encounter a sending error (ClientSocketContext::initiateClose) and
when we successfully sent the entire response to the client
(ClientSocketContext::keepaliveNextRequest).

Similarly, when the request body reading code is done, it now checks whether
the receiving code stopped and closes the connection as needed. This is done
both when we encounter a receiving error
(ConnStateData::noteBodyConsumerAborted) and when we successfully receive the
entire request body from the client (ClientSocketContext::writeComplete).

TODO: This patch focuses on various error cases. We might still have problems
when there is an early HTTP response and no errors of any kind. I marked the
corresponding old code with an XXX.

12 years agoBug 3473: erase last uses of obsolete auth_user_hash_pointer
Amos Jeffries [Tue, 10 Jan 2012 02:40:32 +0000 (19:40 -0700)] 
Bug 3473: erase last uses of obsolete auth_user_hash_pointer

12 years agoBug 3085: Crash when parsing esi:include
Amos Jeffries [Tue, 3 Jan 2012 22:11:51 +0000 (15:11 -0700)] 
Bug 3085: Crash when parsing esi:include

12 years agoBug 3442: assertion failed: external_acl.cc:908: ch->auth_user_request != NULL
Amos Jeffries [Thu, 8 Dec 2011 11:13:29 +0000 (04:13 -0700)] 
Bug 3442: assertion failed: external_acl.cc:908: ch->auth_user_request != NULL

External ACL sometimes cannot find the credentials in ACL Checklist even
if they are attached to the HTTPRequest object.

This seems to happen when the checklist is created and the line match
started before the credentials are known. The credentials validation
updates the HTTP request state but is not aware of ACL checklists needing
to be updated so it never happens.

This patch:
* locate the %LOGIN value from either place where credentials can be found,
* updates the checklist if it was unset,
* passes '-' to the helper if no credentials at all were given.

Although the earlier logics forcing a lookup means this '-' case should
not happen it might if the external ACL were processed in 'fast' check.

12 years agoPolish: debug messages on swap.state rename failure
Amos Jeffries [Thu, 8 Dec 2011 11:11:32 +0000 (04:11 -0700)] 
Polish: debug messages on swap.state rename failure

12 years agoPortability: SSL library dependency fixes
Victor Jose Hernandez Gomez [Wed, 7 Dec 2011 12:04:20 +0000 (05:04 -0700)] 
Portability: SSL library dependency fixes

This displays as many 'undefined reference to' on various X509_* objects.

Correct the library linkage order such that our local library links first
and gets visibility of the OpenSSL library definitions.

12 years agoBug 3440: compile error in Adaptation
Joshua Root [Tue, 6 Dec 2011 12:31:35 +0000 (05:31 -0700)] 
Bug 3440: compile error in Adaptation

12 years ago3.1.18 SQUID_3_1_18
Amos Jeffries [Sat, 3 Dec 2011 06:18:25 +0000 (23:18 -0700)] 
3.1.18

12 years agoRegression: compile error in FTP
Amos Jeffries [Sat, 3 Dec 2011 02:46:33 +0000 (19:46 -0700)] 
Regression: compile error in FTP

12 years ago3.1.17 SQUID_3_1_17
Amos Jeffries [Fri, 2 Dec 2011 14:28:40 +0000 (07:28 -0700)] 
3.1.17

12 years agoBug 3422: Buffer overflow in recv-announce
Jan Klemkow [Fri, 2 Dec 2011 12:56:17 +0000 (05:56 -0700)] 
Bug 3422: Buffer overflow in recv-announce

12 years agoBug 3428: Active FTP data channel accepted twice
Michael Weiser [Fri, 2 Dec 2011 12:54:55 +0000 (05:54 -0700)] 
Bug 3428: Active FTP data channel accepted twice

12 years agoBug 3432: Crash logging FTP errors
yabuki [Fri, 2 Dec 2011 12:43:54 +0000 (05:43 -0700)] 
Bug 3432: Crash logging FTP errors

12 years agoBug 3430: Document SSL EDH cipher configuration issues
Amos Jeffries [Fri, 2 Dec 2011 12:42:05 +0000 (05:42 -0700)] 
Bug 3430: Document SSL EDH cipher configuration issues

12 years agoWindows: cf_gen requires a .exe extension
Amos Jeffries [Fri, 2 Dec 2011 12:37:09 +0000 (05:37 -0700)] 
Windows: cf_gen requires a .exe extension

12 years agoPortability: fix radix.c include sequence
Amos Jeffries [Fri, 2 Dec 2011 12:36:12 +0000 (05:36 -0700)] 
Portability: fix radix.c include sequence

12 years agoFix segfault in %F error page token
Amos Jeffries [Fri, 2 Dec 2011 12:34:56 +0000 (05:34 -0700)] 
Fix segfault in %F error page token

12 years agoPolish: convert one SECURITY WARNING to ALERT
Amos Jeffries [Fri, 2 Dec 2011 12:28:58 +0000 (05:28 -0700)] 
Polish: convert one SECURITY WARNING to ALERT

12 years agoBug 2619: Excessive RAM growth due to unlimited adapted body data consumption
Martin Huter [Fri, 2 Dec 2011 12:17:07 +0000 (05:17 -0700)] 
Bug 2619: Excessive RAM growth due to unlimited adapted body data consumption

If the client does not read from the open connection (i.e. the user does not
confirm the browsers download-message-box in microsofts IE), squid keeps on
reading data from the ICAP server into the store entry, while no more data
can be delivered to the client.
Thus the store entry in memory is growing and squid may - in worst case -
consume memory up to the size of the users download.

This patch add API to StoreEntry to call the producer back when released
memory/space from the StoreEntry and add code to the ICAP client code to not
consume body data comes from the ICAP server when there is not available space
in the store entry.

12 years agoSupport %% in external ACL format
Amos Jeffries [Fri, 2 Dec 2011 08:28:17 +0000 (01:28 -0700)] 
Support %% in external ACL format

12 years agoImproved SASL / SASL2 detection
Francesco Chemolli [Tue, 29 Nov 2011 12:39:25 +0000 (05:39 -0700)] 
Improved SASL / SASL2 detection

Solaris and Darwin require -lsasl compile flag detection independent of
the .h include file naming. This may help other OS as well.

12 years agoBug 3423: access violation in URL parser
Jan Klemkow [Thu, 24 Nov 2011 11:11:42 +0000 (04:11 -0700)] 
Bug 3423: access violation in URL parser