]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
9 years agoFix bootstrap.sh dependency on SPONSORS.list
Amos Jeffries [Mon, 8 Dec 2014 12:07:22 +0000 (04:07 -0800)] 
Fix bootstrap.sh dependency on SPONSORS.list

bootstrap.sh is distributed in tarballs and may be used by packagers for
various reasons. It does not need to unconditionally replace SPONSORS.

9 years agoHTTP/2: Support 421 (Misdirected Request) status code
Amos Jeffries [Mon, 8 Dec 2014 12:05:17 +0000 (04:05 -0800)] 
HTTP/2: Support 421 (Misdirected Request) status code

Add support for status 421 responses. Squid is forbidden from generating
messages with this status in its role as proxy, however we expect to see
it being produced in responses by HTTP/2 servers in traffic from HTTP
2.0<->1.1 gateways.

We also MAY emit it on future reverse-proxy responses in the event of a
ERR_CANNOT_FORWARD message.

9 years agoAlternate-Protocol is a hop-by-hop header
Amos Jeffries [Wed, 3 Dec 2014 12:06:59 +0000 (04:06 -0800)] 
Alternate-Protocol is a hop-by-hop header

Google are pushing Alternate-Protocol header to arbitrarily move clients
from HTTP to their experimental and proprietary protocols.

When relayed through a proxy this can cause traffic bifurcation with
side effects ranging from client visible failures, to traffic increase
on the network as proxy caching is bypassed, to security vulnerabilities
or privacy information leaks over the experimental protocol.

By treating the Alternate-Protocol header as a hop-by-hop header only
relevant on client->origin connections we can both prevent the above
issues occuring on networks utilizing a proxy, and also participate in
the protocol exprimentation process ourselves.

9 years agoBug 4148: external_acl_type header format does not accept the new libformat syntax
Jorge Ivan Burgos Aguilar [Wed, 3 Dec 2014 12:01:13 +0000 (04:01 -0800)] 
Bug 4148: external_acl_type header format does not accept the new libformat syntax

9 years agoBug 4033: Rebuild corrupted ssl_db/size file
Christos Tsantilas [Wed, 3 Dec 2014 11:58:37 +0000 (03:58 -0800)] 
Bug 4033: Rebuild corrupted ssl_db/size file

The certificate db size file may become empty (for reasons beyond Squid
control such as server reboots, and possibly some unknown Squid bugs).
When it becomes empty, all ssl_crtd helpers (and then Squid) quit. This
change is required to make ssl_crtd more robust by recovering lost db
size information.

This patch:
 - Adds the "size" rebuild operation in CertificateDB and ssl_crtd
   daemon. Rebuild ssl_db/size file if it is empty:
     * Inside Ssl::CertificateDb::check method
     * When a CertificateDB operation try to read size from ssl_db/size file

 - If no fs_block_size parameter given for CertificateDB then consider a
   default value of 2048. Currently set to 0, which is may cause segfault to
   ssl_crtd daemon.

This is a Measurement Factory project

9 years agoBug 3902: Docs: external_acl_type cache hash key
Amos Jeffries [Wed, 3 Dec 2014 11:56:40 +0000 (03:56 -0800)] 
Bug 3902: Docs: external_acl_type cache hash key

9 years agoBug 4145: squid_endian.h compile errors with OpenBSD 5.6
Amos Jeffries [Wed, 3 Dec 2014 11:53:03 +0000 (03:53 -0800)] 
Bug 4145: squid_endian.h compile errors with OpenBSD 5.6

* Remove unused big-endian macros.

* Stop making assumptions about little-endian symbols existence. Test
  each one explicitly and define only as necessary.

* Add support for systems with endian.h available.

* Move Endian hacks to libntlmauth which is the only code using them.
  Also, build only if NTLM is required.

9 years agoFix segmentation fault in ACLUrlPathStrategy::match
Amos Jeffries [Thu, 13 Nov 2014 08:19:06 +0000 (00:19 -0800)] 
Fix segmentation fault in ACLUrlPathStrategy::match

CONNECT requests do not contain a path segment. If tested with a
urlpath_regex ACL will crash Squid via xstrdup() NULL protection.

9 years ago3.4.9 SQUID_3_4_9
Amos Jeffries [Fri, 31 Oct 2014 09:21:51 +0000 (02:21 -0700)] 
3.4.9

9 years agoFix man(8)/man(1) page syntax
Amos Jeffries [Fri, 31 Oct 2014 09:18:20 +0000 (02:18 -0700)] 
Fix man(8)/man(1) page syntax

It seems automated tools such as lroff are not able to parse the groff
syntax accurately for automated indexing of our man pages.

The if-conditional syntax was only used to simplify translators lives
so we can live with the tools preferred 1-liner syntax for the NAME
section.

9 years agoSource Maintenance: bump astyle version to 2.03
Amos Jeffries [Fri, 31 Oct 2014 01:44:35 +0000 (18:44 -0700)] 
Source Maintenance: bump astyle version to 2.03

9 years agoBug 4093: source-maintenance.sh bad perl -i option
Alex Rousskov [Fri, 31 Oct 2014 01:33:13 +0000 (18:33 -0700)] 
Bug 4093: source-maintenance.sh bad perl -i option

9 years agoBug 4102: sslbump cert contains only a dot character in key usage extension
Christos Tsantilas [Thu, 30 Oct 2014 15:02:39 +0000 (08:02 -0700)] 
Bug 4102: sslbump cert contains only a dot character in key usage extension

The patch for bug 3966 was slightly incorrect. As a result the Key Usage
field for SSL-bump mimic'ed certificates could end up containing only a
dot (.) character.

9 years agokerberos_ldap_group/cert_tool: Remove ksh dependency
Santiago Garcia Mantinan [Thu, 30 Oct 2014 15:00:59 +0000 (08:00 -0700)] 
kerberos_ldap_group/cert_tool: Remove ksh dependency

Shell scripts published with Squid should be POSIX neutral. Replace the
ksh-specific syntax with portable POSIX shell.

9 years agoext_kerberos_ldap_group_acl: Fix regression typo in 3.4.7
Pavel Timofeev [Thu, 30 Oct 2014 04:58:29 +0000 (21:58 -0700)] 
ext_kerberos_ldap_group_acl: Fix regression typo in 3.4.7

9 years agoBug 3803: ident leaks memory on failure
Amos Jeffries [Thu, 16 Oct 2014 19:22:37 +0000 (12:22 -0700)] 
Bug 3803: ident leaks memory on failure

Begin the process of conversion for IdentStateData to an AsyncJob.

* convert the object from CBDATA struct to a class with
CBDATA_CLASS2() API.

* Bug 3803 is caused by a lack of proper cleanup and consistent exit
actions terminating the job. Take the core logic changes from the
tested bug patch and;

 1) define a swanSong() method to cleanup the memory allocated

 2) define a deleteThis() method to emulate AsyncJob::deleteThis()

* Locate all code paths leveraging conn->close() to trigger cleanup
via the connection close handler and convert to explicit deleteThis()
with excuse. Including a few which were not but need to in order to
terminate the job correctly as fixed in bug 3803 patch.

The actions performed are nearly identical to the original code. The
differences are that many code paths now omit an AsyncCall step going
via the Comm close handler, and that all paths terminating the IDENT
lookup now go through swanSong() cleanup.

Further cleanup converting to a full AsyncJob is not included, since
there is an explicit hash of running IdentStateData object pointers
being used in the old code.

9 years agoBug 4024: Bad host/IP ::1 when using IPv4-only environment
Amos Jeffries [Thu, 16 Oct 2014 18:56:03 +0000 (11:56 -0700)] 
Bug 4024: Bad host/IP ::1 when using IPv4-only environment

9 years agoBug 4093: source-maintenance.sh errors and warnings due to wrong tools/options
Alex Rousskov [Thu, 16 Oct 2014 18:52:13 +0000 (11:52 -0700)] 
Bug 4093: source-maintenance.sh errors and warnings due to wrong tools/options

9 years agoCBDATA: log memory leak situations when --enable-debug-cbdata
Amos Jeffries [Thu, 16 Oct 2014 18:39:55 +0000 (11:39 -0700)] 
CBDATA: log memory leak situations when --enable-debug-cbdata

CBDATA objects are supposed to be explicitly locked and unlocked by all
users. The nominal 'owner' of the data is also supposed to mark it as
invalid when unlocking its reference.

If a CBDATA object reaches 0 locks and is still valid, it therefore
follows that either the locking or invalidate has not been properly
implemented.

Now that we are migrating to CbcPointer usage instead of explicit
lock/unlock macro calls we have started encountering these situations.
Any object reporting a 'leak' must be investigated;
 a) perhapse RefCount is better?
 b) using CbcPointer consistently and invalidating correctly.

9 years agoBug 4088: memory leak in external_acl_type helper with cache=0 or ttl=0
Amos Jeffries [Thu, 9 Oct 2014 11:53:28 +0000 (04:53 -0700)] 
Bug 4088: memory leak in external_acl_type helper with cache=0 or ttl=0

ExternalACLEntry / external_acl_entry objects have been abusing the
CBDATA API for reference counting and since 3.4 this has resulted in
hidden memory leaks as object accounting shows all locks released but
the memory is not freed by any 'owner'.

* convert to using RefCount<> API.

* move ExternalACLEntry pre-define to acl/forward.h

* add ExternalACLEntryPointer in acl/forward.h

* convert LookupDone() method to using explicit typed pointer

* convert from CBDATA_CLASS to MEMPROXY_CLASS memory management.

* convert almost all raw ExternalACLEntry* to Pointer
 - remaining usage is in the cache hash pointers. Use an explicit 'cachd'
  lock/unlock until this hash is updated to std:: structure types.

9 years agoSourceFormat Enforcement
squidadm@squid-cache.org [Wed, 8 Oct 2014 15:31:32 +0000 (15:31 +0000)] 
SourceFormat Enforcement

9 years ago3.4.8 SQUID_3_4_8
Amos Jeffries [Mon, 15 Sep 2014 08:15:59 +0000 (01:15 -0700)] 
3.4.8

9 years agoFix various ICMP handling issues in Squid pinger
Amos Jeffries [Mon, 15 Sep 2014 05:06:14 +0000 (23:06 -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 04:58:34 +0000 (22:58 -0600)] 
Fix off by one in SNMP subsystem

9 years ago3.4.7 SQUID_3_4_7
Amos Jeffries [Wed, 27 Aug 2014 14:22:07 +0000 (07:22 -0700)] 
3.4.7

9 years agoPrep for 3.4.7 and 3.3.13
Amos Jeffries [Wed, 27 Aug 2014 14:11:13 +0000 (07:11 -0700)] 
Prep for 3.4.7 and 3.3.13

9 years agokerberos_ldap_group: Fix 'error during setup of Kerberos credential cache'
Markus Moeller [Wed, 27 Aug 2014 13:36:00 +0000 (06:36 -0700)] 
kerberos_ldap_group: Fix 'error during setup of Kerberos credential cache'

9 years agoIgnore Range headers with unidentifiable byte-range values
Amos Jeffries [Tue, 26 Aug 2014 16:27:23 +0000 (09:27 -0700)] 
Ignore Range headers with unidentifiable byte-range values

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

9 years agoUse v3 for fake certificate if we add _any_ certificate extension.
Alex Rousskov [Tue, 26 Aug 2014 16:22:01 +0000 (09:22 -0700)] 
Use v3 for fake certificate if we add _any_ certificate extension.

We used to force v3 version only when adding the subjectAltName extension.
That broke sites that did not have subjectAltName but used other mimicked x509
extensions, when accessed through Firefox 31 (at least):
  https://bugzilla.mozilla.org/show_bug.cgi?id=1045973

9 years agoFix regression in rev.13156
Amos Jeffries [Sun, 3 Aug 2014 11:56:37 +0000 (05:56 -0600)] 
Fix regression in rev.13156

9 years agoFix %USER_CA_CERT_* and %CA_CERT_ external_acl formating codes
Christos Tsantilas [Sun, 3 Aug 2014 11:13:01 +0000 (05:13 -0600)] 
Fix %USER_CA_CERT_* and %CA_CERT_ external_acl formating codes

* The attribute part of the %USER_CA_CERT_xx and %CA_CERT_xx formating codes
  is not parsed correctly, make these formating codes useless.
* The %USER_CA_CERT_xx documented wrongly

9 years agoEnable compile-time override for MAXTCPLISTENPORTS
Amos Jeffries [Sun, 3 Aug 2014 11:08:15 +0000 (05:08 -0600)] 
Enable compile-time override for MAXTCPLISTENPORTS

MAXTCPLISTENPORTS controls the permitted number of http(s)_port which
may be configured. The hard-coded default is 128 ports.

This patch enables the use of CXXFLAGS="-DMAXTCPLISTENPORTS=n" to set a
new limit when building Squid.

9 years agontlm_sspi_auth: fix various build errors
Amos Jeffries [Thu, 24 Jul 2014 10:16:22 +0000 (03:16 -0700)] 
ntlm_sspi_auth: fix various build errors

* Fix MinGW portability build errors

* Upgrade to current helper protocol.

Also, add SEND_TT helper macro for NTLM helpers

9 years agonegotiate_wrapper: vfork is not portable
Amos Jeffries [Thu, 24 Jul 2014 09:46:02 +0000 (02:46 -0700)] 
negotiate_wrapper: vfork is not portable

Windows does not provide vfork(), so we must test for it before building
the helper.

9 years agoWindows: fix iphlpapi.h include case-sensitivity
Amos Jeffries [Thu, 24 Jul 2014 08:56:18 +0000 (01:56 -0700)] 
Windows: fix iphlpapi.h include case-sensitivity

9 years agoWindows: correct libsspwin32 API for SSP_LogonUser()
Amos Jeffries [Thu, 24 Jul 2014 08:42:19 +0000 (01:42 -0700)] 
Windows: correct libsspwin32 API for SSP_LogonUser()

9 years agonegotiate_sspi_auth: Portability fixes for MinGW
Amos Jeffries [Thu, 24 Jul 2014 08:40:53 +0000 (01:40 -0700)] 
negotiate_sspi_auth: Portability fixes for MinGW

9 years agoext_lm_group_acl: portability fixes for MinGW
Amos Jeffries [Thu, 24 Jul 2014 08:39:38 +0000 (01:39 -0700)] 
ext_lm_group_acl: portability fixes for MinGW

9 years agoSourceFormat Enforcement
Automatic source maintenance [Mon, 14 Jul 2014 00:18:38 +0000 (18:18 -0600)] 
SourceFormat Enforcement

9 years agoBug 4080: worker hangs when client identd is not responding
Oliver Dumschat [Sun, 13 Jul 2014 03:22:40 +0000 (21:22 -0600)] 
Bug 4080: worker hangs when client identd is not responding

9 years agoBug 3966: Add KeyEncipherment when ssl-bump substitues RSA for EC.
Joe Crayne [Sun, 13 Jul 2014 03:15:01 +0000 (21:15 -0600)] 
Bug 3966: Add KeyEncipherment when ssl-bump substitues RSA for EC.

Libnss3, which is used by Firefox to verify the certificate chain, has
different requirements for RSA keys than it does for EC keys.  In particular,
RSA keys with the keyUsage extension, must set the KeyEncipherment flag.

This fix was brought to you by the Samizdat project.
http://samizdat.childrenofmay.org

9 years agoReduce cache_effective_user was leaking $HOME memory
Alex Rousskov [Sun, 13 Jul 2014 03:10:16 +0000 (21:10 -0600)] 
Reduce cache_effective_user was leaking $HOME memory

putenv() leaks memory by design but there is no need to use it at all
when the path is unchanged.

9 years ago3.4.6 SQUID_3_4_6
Amos Jeffries [Wed, 25 Jun 2014 14:40:30 +0000 (07:40 -0700)] 
3.4.6

9 years agoDocs: external_acl_type documentation lies for cache=n option
Christos Tsantilas [Wed, 25 Jun 2014 09:54:28 +0000 (03:54 -0600)] 
Docs: external_acl_type documentation lies for cache=n option

The default cache size for external_acl_type is 256*1024 not unbounded
as
documentation says.

9 years agoNon https connectiona on SSL-bump enabled port may stuck
Christos Tsantilas [Sat, 21 Jun 2014 04:24:37 +0000 (22:24 -0600)] 
Non https connectiona on SSL-bump enabled port may stuck

This is can be seen on skype when try to connect to server using an
SSL-bump enabled squid port. Squid try to bump the connection, waiting
for ever
the ssl protocol header, and skype client waits for ever  an answer from
the
server.

This patch sets the timeout to Config.Timeout.request (request_timeout)

This is a Measurement Factory project

9 years agoDo not leak implicit ACLs during reconfigure.
Alex Rousskov [Sat, 21 Jun 2014 04:22:39 +0000 (22:22 -0600)] 
Do not leak implicit ACLs during reconfigure.

Many ACLs implicitly created by Squid when grouping multiple ACLs were
not
destroyed because those implicit ACLs where not covered by the global
ACL
registry used for ACL destruction.

See also: r13210 which did not go far enough because it incorrectly
assumed
that all InnerNode() children are aclRegister()ed and, hence, will be
centrally freed.

Also, do not use cbdataFree() on non-POD Acl::Tree objects that have
destructors.

TODO: Refcount all ACLs instead.

9 years agoAssure that when LruMap::memLimit_ is set to 0 no entries stored on LruMap
Christos Tsantilas [Sat, 21 Jun 2014 04:21:13 +0000 (22:21 -0600)] 
Assure that when LruMap::memLimit_ is set to 0 no entries stored on LruMap

Changes:
 - Do not add new entries to LruMap if memLimit is 0
 - Remove all entries in LruMap::trim if memLimit set to 0

9 years agoPortability: use 64-bit for X-Cache-Age header
Amos Jeffries [Sat, 21 Jun 2014 04:19:58 +0000 (22:19 -0600)] 
Portability: use 64-bit for X-Cache-Age header

While the value is expected to be well within 32-bit range some OS
(OpenBSD 5.5 at least) use 64-bit time_t. Use the larger type size for
calculations which also removes 32-bit wrap errors, and cast for older
systems.

9 years agoWindows: fix various libip build issues
Amos Jeffries [Sat, 21 Jun 2014 04:19:19 +0000 (22:19 -0600)] 
Windows: fix various libip build issues

* Missing include ws2tcpip.h for IPv6 definitions
* Alternative IN6_ARE_ADDR_EQUAL definition required
* 'byte' is a reserved / system defined type on Windows,
 resolve variable shadowing by renaming to ipbyte.

9 years agoWindows: rename TcpLogger::connect
Amos Jeffries [Mon, 16 Jun 2014 02:49:05 +0000 (20:49 -0600)] 
Windows: rename TcpLogger::connect

Windows sockets API is mapped via #define macros. connect() macro and
this TcpLogger method collide. Rename the method doConnect().

9 years agoWindows: rename ConnOpener::connect
Amos Jeffries [Mon, 16 Jun 2014 02:47:16 +0000 (20:47 -0600)] 
Windows: rename ConnOpener::connect

Windows sockets API is mapped via #define macros. connect() macro and
this ConnOpener method collide. Rename the method doConnect().

9 years agoChange order of BSD-specific network includes so that they are properly picked up
Francesco Chemolli [Mon, 16 Jun 2014 02:45:26 +0000 (20:45 -0600)] 
Change order of BSD-specific network includes so that they are properly picked up

10 years agoDo not leak ex_data for SSL state that survived reconfigure.
Alex Rousskov [Tue, 3 Jun 2014 07:12:54 +0000 (01:12 -0600)] 
Do not leak ex_data for SSL state that survived reconfigure.

SSL_get_ex_new_index() allocates a new index on every call, even if its
parameters remain unchanged. It should be called once per process
lifetime.

Besides leaking, this 12 year-old(!) bug could probably make some SSL
code misbehave during reconfigure because reconfigure would change the
supposedly constant ex_data indexes.

10 years agoDo not register the same Cache Manager action more than once
Alex Rousskov [Tue, 3 Jun 2014 07:10:53 +0000 (01:10 -0600)] 
Do not register the same Cache Manager action more than once

... to avoid wrong mgr:menu output and the impression of a reconfigure
memory leak.

The old code was comparing action object pointers, which could not work,
and was adding the same action on every reconfigure call for modules that
register with Cache Manager during [re]configuration.

We already have a working method for finding registered actions. Use it.

10 years agoFix leaked TcpAcceptor job on reconfiguration
Alex Rousskov [Tue, 3 Jun 2014 07:10:15 +0000 (01:10 -0600)] 
Fix leaked TcpAcceptor job on reconfiguration

... by monitoring and reacting to the listening socket closure.

Every job that waits for Comm I/O must have a FD closure handler.

10 years agoFix leak of ACLs related to adaptation access rules
Alex Rousskov [Tue, 3 Jun 2014 07:05:07 +0000 (01:05 -0600)] 
Fix leak of ACLs related to adaptation access rules

10 years agoBug 4056: assertion MemPools[type] from netdbExchangeStart()
Amos Jeffries [Tue, 3 Jun 2014 07:02:53 +0000 (01:02 -0600)] 
Bug 4056: assertion MemPools[type] from netdbExchangeStart()

10 years agoBug 4065: round-robin neighbor selection with unequal weights
Mike Mitchell [Tue, 3 Jun 2014 06:49:46 +0000 (00:49 -0600)] 
Bug 4065: round-robin neighbor selection with unequal weights

10 years agoBug 4050: Segfault in CommSelectEngine::checkEvents on helper response
Alex Rousskov [Tue, 3 Jun 2014 06:48:39 +0000 (00:48 -0600)] 
Bug 4050: Segfault in CommSelectEngine::checkEvents on helper response

10 years agoFix segfault setting up server SSL connnection
Amos Jeffries [Tue, 20 May 2014 16:40:06 +0000 (09:40 -0700)] 
Fix segfault setting up server SSL connnection

10 years agoRegression: segfault logging with %tg format specifier
Steve Hill [Wed, 14 May 2014 15:36:48 +0000 (09:36 -0600)] 
Regression: segfault logging with %tg format specifier

In rev.13132 Token class data member was converted from union to
struct without adding initializer for the timespec field.

timespec is a redundant field anyway, just remove it.

10 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 8 May 2014 00:18:03 +0000 (18:18 -0600)] 
SourceFormat Enforcement

10 years ago3.4.5 SQUID_3_4_5
Amos Jeffries [Fri, 2 May 2014 12:08:22 +0000 (05:08 -0700)] 
3.4.5

10 years agoLogformat annotation fixes
Christos Tsantilas [Fri, 2 May 2014 07:51:33 +0000 (00:51 -0700)] 
Logformat annotation fixes

Currently note values printed with "%note" formating code, which contain non
alphanumeric characters, were quoted and quotes were then escaped, resulting
in bizarre logged rendition of empty or simple values (often received from
various helpers):
      %22-%22
      %22Default_Google%22
      %22pg13,US%22

This patch:
- does not use quotes to print annotations

- allow system admin to define a separator to use for logged
  annotations. The %note logformat accepts the following argument:
     [name][:separator]
  The separator can be one of the ',' ';' or ':'.
  By default, multiple note values are separated with "," and multiple
  notes are separated with "\r\n". When logging named notes with
  %{name}note, the explicitly configured separator is used between note
  values. When logging all notes with %note, the explicitly configured
  separator is used between individual notes. There is currently no way to
  specify both value and notes separators when logging all notes with %note.

- makes the Format::Token::data a struct (now is a union) and initialize
  Format::Token::data data members in Format::Token::Token constructor.

This is a Measurement Factory project

10 years agoResolve 'dying from an unhandled exception: c'
Amos Jeffries [Fri, 2 May 2014 07:49:18 +0000 (00:49 -0700)] 
Resolve 'dying from an unhandled exception: c'

CbcPointer<> is used from code outside of Job protection where it is
safe to use Must(). In order to get a useful backtrace we need to assert
immediately at the point of failure. Particularly necessary since these
are in generic operators used "everywhere" in the code.

10 years agoFix order dependency between cache_dir and maximum_object_size
Anatoli [Fri, 2 May 2014 07:47:32 +0000 (00:47 -0700)] 
Fix order dependency between cache_dir and maximum_object_size

parse_cachedir() has a call to update_maxobjsize() which limits the
store_maxobjsize variable used as the internal maximum_object_size
variable of the store data structure) to the value of maximum_object_size
defined at the moment of execution of this function, for all stores (all
store directories). So if parse for cache_dir is called before
maximum_object_size, we get the effect of the default 4 MB.

BUT, when we get to parse maximum_object_size line(s) after the last
cache_dir, the maximum_object_size option is processed and only shown on
the cachemgr config page without having updated store_maxobjsize.

10 years agoBug 4051: fix inverted test on CONNECT payload existence
Amos Jeffries [Sat, 26 Apr 2014 10:58:22 +0000 (03:58 -0700)] 
Bug 4051: fix inverted test on CONNECT payload existence

10 years ago3.4.4.2 SQUID_3_4_4_2
Amos Jeffries [Wed, 23 Apr 2014 14:01:34 +0000 (07:01 -0700)] 
3.4.4.2

10 years ago3.4.4.1 SQUID_3_4_4_1
Amos Jeffries [Wed, 23 Apr 2014 12:49:57 +0000 (05:49 -0700)] 
3.4.4.1

10 years agoBug 3371: CONNECT with data sent at once loses data
Amos Jeffries [Wed, 23 Apr 2014 10:40:36 +0000 (04:40 -0600)] 
Bug 3371: CONNECT with data sent at once loses data

10 years ago(no commit message)
Amos Jeffries [Wed, 23 Apr 2014 10:17:18 +0000 (03:17 -0700)] 

10 years agoFix outgoing peer type when using ORIGINAL_DST instead of DIRECT
Amos Jeffries [Wed, 23 Apr 2014 05:15:49 +0000 (22:15 -0700)] 
Fix outgoing peer type when using ORIGINAL_DST instead of DIRECT

10 years agoBug 4047: Support Android builds
Amos Jeffries [Wed, 23 Apr 2014 05:09:22 +0000 (22:09 -0700)] 
Bug 4047: Support Android builds

10 years agoBug 3986 (partial): assertion failed due to incorrect error page buffer size
Amos Jeffries [Wed, 23 Apr 2014 05:06:52 +0000 (22:06 -0700)] 
Bug 3986 (partial): assertion failed due to incorrect error page buffer size

errorpage.cc:1307:
   "(size_t)content->contentSize() == strlen(content->content())"

10 years agoBug 3955: Solaris EUI-48 lookup leaks FDs
Paul Z [Fri, 18 Apr 2014 18:45:17 +0000 (12:45 -0600)] 
Bug 3955: Solaris EUI-48 lookup leaks FDs

10 years agoBug 3982: EUI logging and helpers show blank MAC address
Amos Jeffries [Fri, 18 Apr 2014 18:44:12 +0000 (12:44 -0600)] 
Bug 3982: EUI logging and helpers show blank MAC address

Also,
 * improved debugging of EUI processing.
 * fixed code correctness in EUI class definitions

10 years agoFix IPv6 site-local autoconfigured Address detection
Amos Jeffries [Fri, 18 Apr 2014 18:43:35 +0000 (12:43 -0600)] 
Fix IPv6 site-local autoconfigured Address detection

10 years agoBug 4014: build failure with both --disable-optimizations --disable-auth
Amos Jeffries [Mon, 14 Apr 2014 14:01:29 +0000 (07:01 -0700)] 
Bug 4014: build failure with both --disable-optimizations --disable-auth

10 years agoMemBuf fix: empty MemBufs are not NULL terminated
Christos Tsantilas [Wed, 9 Apr 2014 16:56:54 +0000 (09:56 -0700)] 
MemBuf fix: empty MemBufs are not NULL terminated

This is may cause problems in some cases where the code assume that the MemBuf
is always NULL terminated. For example when an ErrorState object try to use
an empty errorpage template.

This patch terminates the (empty) MemBuf on MemBuf::init method.

10 years agoHTTP/1.1: update reference to IANA method registry
Amos Jeffries [Wed, 9 Apr 2014 16:54:22 +0000 (09:54 -0700)] 
HTTP/1.1: update reference to IANA method registry

10 years agoHTTP/1.1: Update registered status codes from IANA registry
Amos Jeffries [Wed, 9 Apr 2014 16:53:05 +0000 (09:53 -0700)] 
HTTP/1.1: Update registered status codes from IANA registry

IETF HTTPbis WG has created an IANA registry for HTTP status codes at
http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

Update our registered codes and strings to match the registry entries.

10 years agoUpdates to qos_flows documentation
Andrew Beverley [Sun, 6 Apr 2014 04:41:59 +0000 (22:41 -0600)] 
Updates to qos_flows documentation

Minor updates to the qos_flows documentation based on recent squid-users
questions.

10 years agoC++11: Upgrade auto-detection to use the formal -std=c++11
Amos Jeffries [Sun, 6 Apr 2014 04:41:08 +0000 (22:41 -0600)] 
C++11: Upgrade auto-detection to use the formal -std=c++11

When the latest compilers added support for -std=c++11 they also dropped
the temporary -std=c++0x option without backward-compatible support. So
for the newest compilers we have not been testing the C++11 code.

As a result of this change Squid will no longer attempt to enable the
partial support in older compilers with -std=c++0x.

Also, update the compiler option test macro from autoconf project.

10 years agoBasic auth cache and SslBump fix
Christos Tsantilas [Sun, 6 Apr 2014 04:39:32 +0000 (22:39 -0600)] 
Basic auth cache and SslBump fix

This patch fixes the following bug:
 1) A user sends a CONNECT request with valid credentials
 2) Squid checks the credentials and adds the user to the user cache
 3) The same user sends a CONNECT request with invalid credentials
 4) Squid overwrites the entry in the user cache and denies the second
    CONNECT request
 5) The user sends a GET request on the first SSL connection which is
    established by now
 6) Squid knows that it does not need to check the credentials on the
    bumped connection but still somehow checks again whether the user is
    successfully authenticated
 7) Due to the second CONNECT request the user is regarded as not
    successfully authenticated
 8) Squid denies the GET request of the first SSL connection with 403
    ERR_CACHE_ACCESS_DENIED

On proxies with Basic authentication and SSL bumping, this can be used
to prevent a legitimate user from making any HTTPS requests

This is a Measurement Factory project

10 years agocrypto-ng: use libnettle MD5 algorithm support
Amos Jeffries [Sun, 6 Apr 2014 04:37:08 +0000 (22:37 -0600)] 
crypto-ng: use libnettle MD5 algorithm support

Transitional patch detects libnettle when available and uses it without
yet forcing it as a required dependency.

10 years agoBug 4043: Remove XMALLOC_TRACE and references to sbrk(2)
Francesco Chemolli [Sun, 23 Mar 2014 05:00:54 +0000 (23:00 -0600)] 
Bug 4043: Remove XMALLOC_TRACE and references to sbrk(2)

10 years agoPortability: detect struct iovec better on OpenBSD
Francesco Chemolli [Sun, 23 Mar 2014 04:57:40 +0000 (22:57 -0600)] 
Portability: detect struct iovec better on OpenBSD

10 years agoBug 4019: Regression in 3.4 r13079
Martin Stolle [Fri, 21 Mar 2014 08:48:48 +0000 (02:48 -0600)] 
Bug 4019: Regression in 3.4 r13079

10 years agoBug 4041: Missing files in compat/Makefile.am
Changming [Fri, 21 Mar 2014 08:47:02 +0000 (02:47 -0600)] 
Bug 4041: Missing files in compat/Makefile.am

10 years agoUse request URI instead of StoreID when forwarding requests to peers
Nikolai Gorchilov [Fri, 21 Mar 2014 08:45:23 +0000 (02:45 -0600)] 
Use request URI instead of StoreID when forwarding requests to peers

TODO: There are more bugs like that, including using Store IDs in ICP
requests.

10 years ago3.4.4 SQUID_3_4_4
Amos Jeffries [Sun, 9 Mar 2014 09:40:22 +0000 (03:40 -0600)] 
3.4.4

10 years agoPrep for 3.4.4 and 3.3.12
Amos Jeffries [Sun, 9 Mar 2014 03:57:02 +0000 (20:57 -0700)] 
Prep for 3.4.4 and 3.3.12

10 years agoAvoid assertions on Range requests that trigger Squid-generated errors.
Alex Rousskov [Sun, 9 Mar 2014 01:48:00 +0000 (18:48 -0700)] 
Avoid assertions on Range requests that trigger Squid-generated errors.

Added HttpRequest::ignoreRange() to encapsulate range ignoring logic.
Currently the new method only contains the code common among all callers. More
work is needed to check whether further caller homogenization is possible.

Documented that ClientSocketContext::getNextRangeOffset() may sometimes be
called before it is ready to do its job.

10 years agoProtect MemBlob::append() against raw-space writes
Amos Jeffries [Sun, 9 Mar 2014 01:47:23 +0000 (18:47 -0700)] 
Protect MemBlob::append() against raw-space writes

There is no guarantee that the 'unused' area of MemBlob is actually
unused. For example if a read buffer was being filled into the
rawSpace() of a SBuf or MemBlob it will overlap with this empty area
until a read call updates the related size state in MemBlob/SBuf.

For these cases we must use memmove() which guarantees no buffer
corruption will take place on memory overlaps.

10 years agoCopyright: Relicense helpers by Treehouse Networks Ltd.
Amos Jeffries [Sun, 9 Mar 2014 01:45:37 +0000 (18:45 -0700)] 
Copyright: Relicense helpers by Treehouse Networks Ltd.

Update the license on helper code designed and authored by myself using
the BSD 2-clause license. This makes the example helper code and license
more legally acceptible for use as a basis of proprietary helpers while
remaining compatible with GPL for distribution with Squid.

10 years agoPortability: define CMSG related structures individually
Amos Jeffries [Sun, 9 Mar 2014 01:44:07 +0000 (18:44 -0700)] 
Portability: define CMSG related structures individually

Some OS provide the CMSG related definitions and others only partially
define them. Sometimes (Windows particularly) this varies between build
environments.

Checking for each symbol separately and providing only those needed
avoids problems we have been having with missing or redefined symbols
on Windows and elsewhere.

10 years agoFix helper ID number assignment
Amos Jeffries [Wed, 5 Mar 2014 02:50:43 +0000 (19:50 -0700)] 
Fix helper ID number assignment

Since helpers are now dynamically started the old method of allocating
an ID number based on the current start sequence can result in many
helpers being assigned overlapping ID numbers.

Use InstanceID template instead to assure a unique incremental ID is
assigned to each helper no matter when it is started.

10 years agoFixed stalled concurrent rock store reads by insuring their ID uniqueness.
Alex Rousskov [Wed, 5 Mar 2014 02:49:29 +0000 (19:49 -0700)] 
Fixed stalled concurrent rock store reads by insuring their ID uniqueness.

Added a check to prevent similar bugs from occurring in the future.

10 years agoBug 3186, Bug 3628: Digest authentication always sending stale=false for nonce
Henrik Nordstrom [Wed, 5 Mar 2014 02:48:25 +0000 (19:48 -0700)] 
Bug 3186, Bug 3628: Digest authentication always sending stale=false for nonce

10 years agodynamic_cert_mem_cache_size option related fixes
Christos Tsantilas [Tue, 4 Mar 2014 10:14:42 +0000 (03:14 -0700)] 
dynamic_cert_mem_cache_size option related fixes

This patch fixes the following problems:

1) The dynamic_cert_mem_cache_size does not change on reconfigure

2) When dynamic_cert_mem_cache_size of http_port set to 0 then:

   a) The dynamic certs cache is grow unlimited.
      This patch just disables certificates caching when this option set to 0.

   b) Huge amount of memory appeared as free cache memory in  "Cached ssl
      certificates statistic" page of cache manager.
      This problem caused because of a signed to unsigned int conversion.

  This is a Measurement Factory project