]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
8 years agoDetect HTTP header ACL issues
Amos Jeffries [Fri, 30 Dec 2016 06:27:19 +0000 (19:27 +1300)] 
Detect HTTP header ACL issues

rep_header and req_header ACL types cannot match multiple different
headers in one test (unlike Squid-2 appears to have done). Produce
an ERROR and ignore the extra line(s) instead of silently changing
all the previous regex to match the second header name.

Also detect and ERROR when header name is missing entirely. Ignore
these lines instead of asserting.

8 years agoBug 3940 pt2: Make 'cache deny' do what is documented
Amos Jeffries [Thu, 22 Dec 2016 04:08:55 +0000 (17:08 +1300)] 
Bug 3940 pt2: Make 'cache deny' do what is documented

Instead of overriding whatever cacheability was previously set to
(including changing non-cacheables to be cacheable) actually
prevent both cache read and write.

8 years agoCleanup: Refactor libauth Config object(s)
Amos Jeffries [Wed, 21 Dec 2016 17:11:34 +0000 (06:11 +1300)] 
Cleanup: Refactor libauth Config object(s)

Refactoring the Auth::Config objects to get v5 building again.

The object storing auth_param settings is renamed to SchemeConfig.

A new Auth::Config object is added. The objects holding auth_param,
auth_schemes and other authenticate_* directives settings are stored
there instead of just auth_params.

Lots of outdated doxygen docs that have more up to date copies elsewhere
are removed. The "\ingroup AuthAPI" are left for now since some auth
things are not yet in the Auth:: namespace, but other auth related
groups are dropped completely.

Code parsing and dumping auth_param lines has been de-duplicated. Along
with the keep_alive and utf8 settings, which are shared by multiple
schemes. This allows dropping several virtual methods from NTLM and
Negotiate scheme objects.

An auth/forward.h file is added for predefines. Some initial Auth::
symbols are listed there. It is not complete, but others can be added as
needed later.

Some unnecessary includes have been removed. There are probably more. I
just did the obvious ones related to the new auth/forward.h and
auth/Config.h files at this time.

8 years agoUpdates after audit
Amos Jeffries [Wed, 21 Dec 2016 12:42:05 +0000 (01:42 +1300)] 
Updates after audit

8 years agoFix shadowing of member 'type' in SchemeConfig
Amos Jeffries [Tue, 20 Dec 2016 13:49:23 +0000 (02:49 +1300)] 
Fix shadowing of member 'type' in SchemeConfig

8 years agoDe-duplicate shared auth parameters keep_alive and utf8
Amos Jeffries [Tue, 20 Dec 2016 12:37:56 +0000 (01:37 +1300)] 
De-duplicate shared auth parameters keep_alive and utf8

8 years agoDe-duplicate parsing of 'auth_param ... program' lines
Amos Jeffries [Tue, 20 Dec 2016 10:55:45 +0000 (23:55 +1300)] 
De-duplicate parsing of 'auth_param ... program' lines

8 years agoMerged from 5.0.0-r14982
Amos Jeffries [Tue, 20 Dec 2016 10:46:00 +0000 (23:46 +1300)] 
Merged from 5.0.0-r14982

8 years agoFix GCC6: unused local variable 'weInitiatedThisClosure'
Amos Jeffries [Tue, 20 Dec 2016 10:45:25 +0000 (23:45 +1300)] 
Fix GCC6: unused local variable 'weInitiatedThisClosure'

8 years agoRemove some unnecessary nullptr on changed lines
Amos Jeffries [Tue, 20 Dec 2016 10:21:21 +0000 (23:21 +1300)] 
Remove some unnecessary nullptr on changed lines

8 years agoShuffle other auth config options to Auth::Config
Amos Jeffries [Tue, 20 Dec 2016 09:12:07 +0000 (22:12 +1300)] 
Shuffle other auth config options to Auth::Config

Also, remove some unnecessary includes

8 years agoMerge from 5.0.0 r14981
Amos Jeffries [Mon, 19 Dec 2016 14:10:52 +0000 (03:10 +1300)] 
Merge from 5.0.0 r14981

8 years agoRun source maintenance
Amos Jeffries [Mon, 19 Dec 2016 14:06:15 +0000 (03:06 +1300)] 
Run source maintenance

8 years agobasic_sasl_auth: Add copyright blurb to SASL config file
Amos Jeffries [Mon, 19 Dec 2016 14:05:04 +0000 (03:05 +1300)] 
basic_sasl_auth: Add copyright blurb to SASL config file

8 years agoRemove some extra includes, predefines and docs
Amos Jeffries [Mon, 19 Dec 2016 12:50:10 +0000 (01:50 +1300)] 
Remove some extra includes, predefines and docs

8 years agoDrop AuthNegotiateAPI and AuthNegotiateInternal doxygen groups
Amos Jeffries [Mon, 19 Dec 2016 10:53:42 +0000 (23:53 +1300)] 
Drop AuthNegotiateAPI and AuthNegotiateInternal doxygen groups

8 years agoDrop old Basic Authenticatio docs
Amos Jeffries [Mon, 19 Dec 2016 10:47:37 +0000 (23:47 +1300)] 
Drop old Basic Authenticatio docs

The wiki these days contains a more detailed and correct description of
how Basic auth helpers work in Squid. This old document does not even
describe how the code works, so is no longer useful.

8 years agoRemove doxygen 'ingroup AuthSchemeAPI'
Amos Jeffries [Mon, 19 Dec 2016 10:31:29 +0000 (23:31 +1300)] 
Remove doxygen 'ingroup AuthSchemeAPI'

8 years agoShuffle auth_schemes config objects into Auth::Config
Amos Jeffries [Mon, 19 Dec 2016 10:27:54 +0000 (23:27 +1300)] 
Shuffle auth_schemes config objects into Auth::Config

Also, move the directive definition down into "Access Controls" section
of squid.conf to avoid dependency issues with acl directive definitions
being done too late.

8 years agoFix error: unused variable 'weInitiatedThisClosure'
Amos Jeffries [Sun, 18 Dec 2016 11:34:47 +0000 (00:34 +1300)] 
Fix error: unused variable 'weInitiatedThisClosure'

8 years agoBump changelog dates
Amos Jeffries [Fri, 16 Dec 2016 04:05:17 +0000 (17:05 +1300)] 
Bump changelog dates

8 years agoDo not share private responses with collapsed client(s).
Eduard Bagdasaryan [Fri, 16 Dec 2016 02:02:43 +0000 (15:02 +1300)] 
Do not share private responses with collapsed client(s).

This excessive sharing problem with collapsed forwarding code has
several layers. In most cases, the core CF code does not share
uncachable or private response with collapsed clients because of the
refreshCheckHTTP() check. However, some responses might not be subject
to that (or equivalent) check. More importantly, collapsed revalidation
code does not check its responses at all and, hence, easily shares
private responses.

This short-term fix incorrectly assumes that an entry may become private
(KEY_PRIVATE) only when it cannot be shared among multiple clients
(e.g., because of a Cache-Control:private response header). However,
there are a few other cases when an entry becomes private. One of them
is a DISK_NO_SPACE_LEFT error inside storeSwapOutFileClosed() where
StoreEntry::releaseRequest() sets KEY_PRIVATE for a sharable entry [that
may still be perfectly preserved in the memory cache]. Consequently, the
short-term fix reduces CF effectiveness. The extent of this reduction is
probably environment-dependent.

Also: do not re-use SET_COOKIE headers for collapsed revalidation slaves,
i.e., adhere to the same requirement as for regular response HITs.

8 years agoDocs: add release notes for auth_schemes
Amos Jeffries [Thu, 15 Dec 2016 11:44:13 +0000 (00:44 +1300)] 
Docs: add release notes for auth_schemes

8 years agoPrep for 4.0.17 and 3.5.23
Amos Jeffries [Thu, 15 Dec 2016 11:06:18 +0000 (00:06 +1300)] 
Prep for 4.0.17 and 3.5.23

8 years agoAdd missing dependecies for squid.conf AuthSchemes objects
Amos Jeffries [Thu, 15 Dec 2016 06:50:53 +0000 (19:50 +1300)] 
Add missing dependecies for squid.conf AuthSchemes objects

8 years agoAdd new Auth::Config class for libauth directives
Amos Jeffries [Thu, 15 Dec 2016 06:25:06 +0000 (19:25 +1300)] 
Add new Auth::Config class for libauth directives

Also, reduce some for loops using C++11 range-for.

8 years agoRefactor libauth Config object(s)
Amos Jeffries [Wed, 14 Dec 2016 22:13:26 +0000 (11:13 +1300)] 
Refactor libauth Config object(s)

* Rename auth_param config object to Auth::SchemeConfig
 + update filename to match

* Add auth/forward.h file for predefines and namespace docs

* Move auth_schemes config object to Auth:: namespace

8 years agoBug 2258 pt2: bypassing cache but not destroying cache entry
Garri Djavadyan [Sun, 11 Dec 2016 06:15:03 +0000 (19:15 +1300)] 
Bug 2258 pt2: bypassing cache but not destroying cache entry

8 years agoauthor: Eduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Christos Tsantilas [Sat, 10 Dec 2016 16:27:09 +0000 (18:27 +0200)] 
author: Eduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
A typo fix for r14973 revealed by Jenkins.

Should use 'ConfigParser::LastTokenWasQuoted()' instead of
'ConfigParser::LastTokenWasQuoted'.

8 years agoSourceFormat Enforcement
Source Maintenance [Sat, 10 Dec 2016 06:12:06 +0000 (06:12 +0000)] 
SourceFormat Enforcement

8 years agoAdded auth_schemes to control schemes presence and order in 401s/407s.
Eduard Bagdasaryan [Sat, 10 Dec 2016 04:48:25 +0000 (21:48 -0700)] 
Added auth_schemes to control schemes presence and order in 401s/407s.

The new squid.conf directive may be used to customize authentication
schemes presence and order in Squid's HTTP 401 (Unauthorized) and 407
(Proxy Authentication Required) responses. The defaults remain the same.

8 years agoSourceFormat Enforcement
Source Maintenance [Fri, 9 Dec 2016 00:12:16 +0000 (00:12 +0000)] 
SourceFormat Enforcement

8 years agoCleanup: Refactor custom ACL-controlled actions configuration code.
Eduard Bagdasaryan [Thu, 8 Dec 2016 20:38:12 +0000 (09:38 +1300)] 
Cleanup: Refactor custom ACL-controlled actions configuration code.

* Reduced parsing code duplication by adding ParseAclWithAction().

* Used functors for generic action-to-string conversions. It is possible
  now to perform such conversions providing lambda expressions.

* Used vectors of strings instead of C-style arrays for storing
  conversion tables and check against bounds with vector::at().

8 years agoSourceFormat Enforcement
Source Maintenance [Thu, 8 Dec 2016 00:12:08 +0000 (00:12 +0000)] 
SourceFormat Enforcement

8 years agoBug 4169: HIT marked as MISS when If-None-Match does not match
Garri Djavadyan [Wed, 7 Dec 2016 19:39:21 +0000 (08:39 +1300)] 
Bug 4169: HIT marked as MISS when If-None-Match does not match

8 years agoHTTP/1.1: Add registered codes entry for new 103 (Early Hints) status code
Amos Jeffries [Wed, 7 Dec 2016 11:53:33 +0000 (00:53 +1300)] 
HTTP/1.1: Add registered codes entry for new 103 (Early Hints) status code

8 years agoBug 3940 (partial): hostHeaderVerify failures MISS when they should be HIT
Garri Djavadyan [Wed, 7 Dec 2016 00:05:07 +0000 (13:05 +1300)] 
Bug 3940 (partial): hostHeaderVerify failures MISS when they should be HIT

This fixes the critical condition leading to the HIT. However not all
code is correctly setting flags.noCache and flags.cacheable (see bugzilla).
So there may be other fixes needed after this.

8 years agoBug 2258: bypassing cache but not destroying cache entry
Garri Djavadyan [Tue, 6 Dec 2016 23:57:47 +0000 (12:57 +1300)] 
Bug 2258: bypassing cache but not destroying cache entry

8 years agoBug 4406: SIGSEV in TunnelStateData::handleConnectResponse() during reconfigure and...
Michael Buchau [Tue, 6 Dec 2016 23:42:35 +0000 (12:42 +1300)] 
Bug 4406: SIGSEV in TunnelStateData::handleConnectResponse() during reconfigure and restart

8 years agoSupport IPv6 NAT with PF for NetBSD and FreeBSD
Egervary Gergely [Sat, 3 Dec 2016 13:22:13 +0000 (02:22 +1300)] 
Support IPv6 NAT with PF for NetBSD and FreeBSD

8 years agoFix compile error after rev.14960
Amos Jeffries [Thu, 1 Dec 2016 02:22:25 +0000 (15:22 +1300)] 
Fix compile error after rev.14960

8 years agoCleanup: remove raw-pointer SSL* from ServerBump class API
Amos Jeffries [Thu, 1 Dec 2016 01:52:52 +0000 (14:52 +1300)] 
Cleanup: remove raw-pointer SSL* from ServerBump class API

8 years agoSourceFormat Enforcement
Source Maintenance [Thu, 1 Dec 2016 00:12:03 +0000 (00:12 +0000)] 
SourceFormat Enforcement

8 years agoMerge SBuf-based RegexData
Francesco Chemolli [Wed, 30 Nov 2016 23:52:56 +0000 (23:52 +0000)] 
Merge SBuf-based RegexData

8 years agoMerge from trunk
Francesco Chemolli [Wed, 30 Nov 2016 23:16:16 +0000 (23:16 +0000)] 
Merge from trunk

8 years agoRevert C++11 std::regex changes
Amos Jeffries [Wed, 30 Nov 2016 08:39:14 +0000 (21:39 +1300)] 
Revert C++11 std::regex changes

CentOS 7 (and thus probably also RHEL 7) still have difficulty using
GCC 5+ compiler necessary for this C++11 code to be used reliably.

see http://lists.squid-cache.org/pipermail/squid-dev/2015-July/002884.html

8 years agoBug 3290: authenticate_ttl not working for digest authentication
Garri Djavadyan [Sun, 27 Nov 2016 13:57:50 +0000 (02:57 +1300)] 
Bug 3290: authenticate_ttl not working for digest authentication

8 years agoBug 4007: Hang on DNS query with dead-end CNAME
Stephen Baynes [Sun, 27 Nov 2016 13:45:08 +0000 (02:45 +1300)] 
Bug 4007: Hang on DNS query with dead-end CNAME

DNS lookup recursion no longer occurs. ipcacheParse() return values are no
longer useful.

Also, cleanup the debugging output.

8 years agoCleanup: use return after self_destruct() to make Coverity happier
Amos Jeffries [Sun, 20 Nov 2016 16:44:03 +0000 (05:44 +1300)] 
Cleanup: use return after self_destruct() to make Coverity happier

 Detected by Coverity Scan. Issue 1154218.

8 years agoSourceFormat Enforcement
Source Maintenance [Sun, 20 Nov 2016 12:12:08 +0000 (12:12 +0000)] 
SourceFormat Enforcement

8 years agoC++11: Remove GnuRegex and all -lregex related code
Amos Jeffries [Sun, 20 Nov 2016 09:12:00 +0000 (22:12 +1300)] 
C++11: Remove GnuRegex and all -lregex related code

Squid is now exclusively using the STL std::regex API provided on all
operating systems in a portable manner.

We no longer have any need of detecting if the system is providing a
libregex, or user has configured one, or if it actually works, or how
to call it, or use the GnuRegex code as a backup when one of those
complex details goes wrong.

8 years agoBug 4599 pt3: use wrapper functions to access BIO object internals
Christos Tsantilas [Sat, 19 Nov 2016 13:25:15 +0000 (02:25 +1300)] 
Bug 4599 pt3: use wrapper functions to access BIO object internals

8 years agoCleanup: replace HTTP Request bitmap flags with boolean
Amos Jeffries [Sat, 19 Nov 2016 07:24:46 +0000 (20:24 +1300)] 
Cleanup: replace HTTP Request bitmap flags with boolean

8 years agoFix Null pointer dereferences after rev.14913
Amos Jeffries [Fri, 18 Nov 2016 18:08:30 +0000 (07:08 +1300)] 
Fix Null pointer dereferences after rev.14913

on_unsupported_protocol with non-HTTP requests occurs without
an HTTP request object. Some ACLs will not be possible to check
but that is not a reason to crash.

 Detected by Coverity Scan. Issue 1394291.

8 years agoTLS: Add ErrorString() function to libsecurity API
Amos Jeffries [Fri, 18 Nov 2016 08:42:13 +0000 (21:42 +1300)] 
TLS: Add ErrorString() function to libsecurity API

To convert library error codes to strings in a library agnostic way.

8 years agoFix ICAP Allow header containing only trailers option
Amos Jeffries [Fri, 18 Nov 2016 06:19:19 +0000 (19:19 +1300)] 
Fix ICAP Allow header containing only trailers option

r14941 added 'tailers' option to te Allow header but did not send it when
only that option was used, without the 204 or 206 features.

 Detected by Coverity Scan. Issue 1394381.

8 years agoFix r14945: Fixed Write.cc:41 "!ccb->active()" assertion.
Christos Tsantilas [Thu, 17 Nov 2016 10:13:41 +0000 (12:13 +0200)] 
Fix r14945:  Fixed Write.cc:41 "!ccb->active()" assertion.

The r14945 patch has a major bug:
 When the Http::One::Server::writeControlMsgAndCall fails to write the control
message, schedules a Comm::Write callback using just a ScheduleCallHere command.
The callback called withtout the CommIoCbParams details and squid is crashes.

This patch fixes the ConnStateData::writeControlMsgAndCall to return false if it
fails to write the control message and allow the caller to handle the failure.

This is a Measurement Factory project

8 years agoMerged previous wordlist work
Francesco Chemolli [Tue, 15 Nov 2016 16:27:55 +0000 (16:27 +0000)] 
Merged previous wordlist work

8 years agoSourceFormat Enforcement
Source Maintenance [Tue, 15 Nov 2016 12:12:01 +0000 (12:12 +0000)] 
SourceFormat Enforcement

8 years agoFix build tests error after r14945 patch: 'Fixed Write.cc:41 "\!ccb->active()" assert...
Christos Tsantilas [Tue, 15 Nov 2016 10:50:21 +0000 (12:50 +0200)] 
Fix build tests error after r14945 patch: 'Fixed Write.cc:41 "\!ccb->active()" assertion.'

8 years agoFixed Write.cc:41 "!ccb->active()" assertion.
Christos Tsantilas [Tue, 15 Nov 2016 09:41:26 +0000 (11:41 +0200)] 
Fixed Write.cc:41 "!ccb->active()" assertion.

The following sequence of events triggers this assertion:
  - The server sends an 1xx control message.
  - http.cc schedules ConnStateData::sendControlMsg call.
  - Before sendControlMsg is fired, http.cc detects an error (e.g., I/O
    error or timeout) and starts writing the reply to the user.
  - The ConnStateData::sendControlMsg is fired, starts writing 1xx, and
    hits the "no concurrent writes" assertion.

We could only reproduce this sequence in the lab after changing Squid
code to trigger a timeout at the right moment, but the sequence looks
plausible. Other event sequences might result in the same outcome.

To avoid concurrent writes, Squid now drops the control message if
Http::One::Server detects that a reply is already being written. Also,
ConnStateData delays reply writing until a pending control message write
has been completed.

This is a Measurement Factory project.

8 years agoBug 4630: user credentials cache cleanup not re-scheduled
Garri Djavadyan [Tue, 15 Nov 2016 09:34:16 +0000 (22:34 +1300)] 
Bug 4630: user credentials cache cleanup not re-scheduled

8 years agoBug 4599 pt2: use functor for locking in libsecurity Pointers
Amos Jeffries [Tue, 15 Nov 2016 06:50:00 +0000 (19:50 +1300)] 
Bug 4599 pt2: use functor for locking in libsecurity Pointers

8 years agoDocs: release notes for ICAP Trailers
Amos Jeffries [Tue, 15 Nov 2016 06:49:07 +0000 (19:49 +1300)] 
Docs: release notes for ICAP Trailers

8 years agoICAP: Initial support for trailers
Eduard Bagdasaryan [Tue, 15 Nov 2016 05:08:59 +0000 (18:08 +1300)] 
ICAP: Initial support for trailers

ICAP trailers are currently specified by
https://datatracker.ietf.org/doc/draft-rousskov-icap-trailers/

This implementation complies with version -01 of that draft:

- Squid unconditionally announces ICAP Trailer support via the ICAP
  Allow request header field.

- Squid parses the ICAP response trailer if and only if the ICAP server
  signals its presence by sending both Trailer header and Allow/trailers
  in the ICAP response.

Squid logs and ignores all parsed ICAP header fields (for now).

Also refactored HttpHeader parsing methods in order to reuse them for
ICAP trailer parsing.

Also simplified and fixed headers isolating code while dealing with
empty (i.e. zero header fields) headers. Old httpMsgIsolateHeaders()
tried to re-implement header end detection/processing logic that is
actually covered by headersEnd(). Old httpMsgIsolateHeaders() could
return success for some garbage input (e.g., a buffer of several CRs)
even if no end of headers was found.

8 years agoMerged from trunk
Francesco Chemolli [Mon, 14 Nov 2016 16:28:31 +0000 (16:28 +0000)] 
Merged from trunk

8 years agoFix handling of -i and +i; streamline code
Francesco Chemolli [Mon, 14 Nov 2016 16:18:10 +0000 (16:18 +0000)] 
Fix handling of -i and +i; streamline code

8 years agofix bug: do not omit regex acl entries when optimizing
Francesco Chemolli [Mon, 14 Nov 2016 15:20:55 +0000 (15:20 +0000)] 
fix bug: do not omit regex acl entries when optimizing

8 years agoBug 3533: Cache still valid after HTTP/1.1 303 See Other
Garri Djavadyan [Mon, 14 Nov 2016 13:17:06 +0000 (02:17 +1300)] 
Bug 3533: Cache still valid after HTTP/1.1 303 See Other

RFC7231 does not mention 303 response as non-cacheable.
So, assuming that means it *is* cacheable.

8 years agoMerged from trunk
Francesco Chemolli [Sun, 13 Nov 2016 23:50:21 +0000 (23:50 +0000)] 
Merged from trunk

8 years agoMove acl/RegexData.cc to SBuf
Francesco Chemolli [Sun, 13 Nov 2016 23:48:58 +0000 (23:48 +0000)] 
Move acl/RegexData.cc to SBuf

8 years agoSourceFormat Enforcement
Source Maintenance [Sat, 12 Nov 2016 12:12:17 +0000 (12:12 +0000)] 
SourceFormat Enforcement

8 years agoImprove JoinContainerToSBuf
Francesco Chemolli [Sat, 12 Nov 2016 10:37:07 +0000 (10:37 +0000)] 
Improve JoinContainerToSBuf

8 years agoReady for testing
Francesco Chemolli [Fri, 11 Nov 2016 22:43:43 +0000 (22:43 +0000)] 
Ready for testing

8 years agoFix 'ftpSendEPRT defined but not used' compile error after patch r14936
Christos Tsantilas [Fri, 11 Nov 2016 16:26:54 +0000 (18:26 +0200)] 
Fix 'ftpSendEPRT defined but not used' compile error after patch r14936

8 years agoSegfault via Ftp::Client::readControlReply.
Christos Tsantilas [Fri, 11 Nov 2016 16:14:16 +0000 (18:14 +0200)] 
Segfault via Ftp::Client::readControlReply.

Added nil dereference checks for Ftp::Client::ctrl.conn, including:
- Ftp::Client::handlePasvReply() and handleEpsvReply() that dereference
  ctrl.conn in DBG_IMPORTANT messages.
- Many functions inside FtpClient.cc and FtpGateway.cc files.

TODO: We need to find a better way to handle nil ctrl.conn. It is only
a matter of time when we forget to add another dereference check or
discover a place we missed during this change.

Also disabled forwarding of EPRT and PORT commands to origin servers.
Squid support for those commands is broken and their forwarding may
cause segfaults (bug #4004). Active FTP is still supported, of course.

This is a Measurement Factory project

8 years agoFix some missing returns after rev.14934
Amos Jeffries [Fri, 11 Nov 2016 04:28:06 +0000 (17:28 +1300)] 
Fix some missing returns after rev.14934

8 years agoBug 3379: Combination of If-Match and a Cache Hit result in TCP Connection Failure
Garri Djavadyan [Thu, 10 Nov 2016 15:40:47 +0000 (04:40 +1300)] 
Bug 3379: Combination of If-Match and a Cache Hit result in TCP Connection Failure

8 years agoDocs: add Release Notes template for Squid-5
Amos Jeffries [Thu, 10 Nov 2016 12:25:53 +0000 (01:25 +1300)] 
Docs: add Release Notes template for Squid-5

8 years agoBranch 5.0.0
Source Maintenance [Wed, 9 Nov 2016 13:36:29 +0000 (13:36 +0000)] 
Branch 5.0.0

8 years agoTLS: use Security::SessionPointer for helper state maintenance
Amos Jeffries [Tue, 8 Nov 2016 06:37:32 +0000 (19:37 +1300)] 
TLS: use Security::SessionPointer for helper state maintenance

8 years agoImprove debugs warnings when loading signing certs fails
Amos Jeffries [Tue, 8 Nov 2016 06:34:59 +0000 (19:34 +1300)] 
Improve debugs warnings when loading signing certs fails

8 years agoMake key= before cert= a fatal error instead of quietly hiding the issue
Amos Jeffries [Tue, 8 Nov 2016 06:33:38 +0000 (19:33 +1300)] 
Make key= before cert= a fatal error instead of quietly hiding the issue

8 years agoBug 4599 pt1: initial support for OpenSSL v1.1
Amos Jeffries [Mon, 7 Nov 2016 10:49:37 +0000 (23:49 +1300)] 
Bug 4599 pt1: initial support for OpenSSL v1.1

Converts some CRYPTO_add(..., CRYPTO_LOCK_X509) calls with portability
wrapper for X509_up_ref(). Just the calls which are in code not yet using
Security::CertPointer.

8 years agoBug 4610 pt2: compile errors on Solaris 11.3 with Oracle Studio 12.5
Amos Jeffries [Mon, 7 Nov 2016 07:37:33 +0000 (20:37 +1300)] 
Bug 4610 pt2: compile errors on Solaris 11.3 with Oracle Studio 12.5

8 years agoCleanup: remove needless get() in libsecurity
Amos Jeffries [Mon, 7 Nov 2016 06:15:04 +0000 (19:15 +1300)] 
Cleanup: remove needless get() in libsecurity

8 years agoCleanup: remove unused Config::ext_methods
Amos Jeffries [Mon, 7 Nov 2016 05:24:26 +0000 (18:24 +1300)] 
Cleanup: remove unused Config::ext_methods

8 years agoCleanup: remove unused wordlist API functions
Amos Jeffries [Mon, 7 Nov 2016 02:41:30 +0000 (15:41 +1300)] 
Cleanup: remove unused wordlist API functions

8 years agosecurity_file_certgen: remove useless get()
Amos Jeffries [Sun, 6 Nov 2016 15:57:02 +0000 (04:57 +1300)] 
security_file_certgen: remove useless get()

8 years agoUse Security::CertPointer in ACLServerCertificateStrategy
Amos Jeffries [Sun, 6 Nov 2016 15:54:33 +0000 (04:54 +1300)] 
Use Security::CertPointer in ACLServerCertificateStrategy

8 years agoFix missing return in HardFun functor template
Amos Jeffries [Sat, 5 Nov 2016 09:42:15 +0000 (22:42 +1300)] 
Fix missing return in HardFun functor template

8 years agoSourceFormat Enforcement
Source Maintenance [Sat, 5 Nov 2016 00:12:14 +0000 (00:12 +0000)] 
SourceFormat Enforcement

8 years agoDo not hide an already constant SBuf::id or expose its internals.
Alex Rousskov [Fri, 4 Nov 2016 22:05:07 +0000 (16:05 -0600)] 
Do not hide an already constant SBuf::id or expose its internals.

8 years agoImproved testAppendSBuf to actually test SBuf::append() optimization.
Alex Rousskov [Fri, 4 Nov 2016 22:04:34 +0000 (16:04 -0600)] 
Improved testAppendSBuf to actually test SBuf::append() optimization.

... rather than to test SBuf::id preservation across assignments
[currently used by that optimization].

Trunk r14911 talks about bitwise object copy but making sure that SBuf
has a working assignment operator is an issue unrelated to append() and
its optimization. Besides, it is not really the prohibited by C++
bitwise copy that we might worry about but the default member-wise
assignment that we may forget to customize.

8 years agoHonor SBufReservationRequirements::minSize regardless of idealSize.
Alex Rousskov [Fri, 4 Nov 2016 21:14:54 +0000 (15:14 -0600)] 
Honor SBufReservationRequirements::minSize regardless of idealSize.

In a fully specified SBufReservationRequirements, idealSize would
naturally match or exceed minSize. However, the idealSize default value
(zero) may not. We should honor minSize regardless of idealSize, just as
the API documentation promises to do.

No runtime changes expected right now because the only existing user of
SBufReservationRequirements sets .idealSize to CLIENT_REQ_BUF_SZ (4096)
and .minSize to 1024.

8 years agoSourceFormat Enforcement
Source Maintenance [Fri, 4 Nov 2016 18:12:20 +0000 (18:12 +0000)] 
SourceFormat Enforcement

8 years agoMinor polishing fixes inside tunnelPeerSelectComplete function
Christos Tsantilas [Fri, 4 Nov 2016 17:05:48 +0000 (19:05 +0200)] 
Minor polishing fixes inside tunnelPeerSelectComplete function

8 years agoFwdState::connectStart() cleanup
Christos Tsantilas [Fri, 4 Nov 2016 16:48:53 +0000 (18:48 +0200)] 
FwdState::connectStart() cleanup

 The pinned_connection->stopPinnedConnectionMonitoring() call does not needed,
it is already called from inside pinned_connection->borrowPinnedConnection
called two lines before.

This is a Measurement Factory project

8 years agoSupport tunneling of bumped non-HTTP traffic. Other SslBump fixes.
Christos Tsantilas [Fri, 4 Nov 2016 16:47:34 +0000 (18:47 +0200)] 
Support tunneling of bumped non-HTTP traffic. Other SslBump fixes.

Use case: Skype groups appear to use TLS-encrypted MSNP protocol instead
of HTTPS. This change allows Squid admins using SslBump to tunnel Skype
groups and similar non-HTTP traffic bytes via "on_unsupported_protocol
tunnel all". Previously, the combination resulted in encrypted HTTP 400
(Bad Request) messages sent to the client (that does not speak HTTP).

Also this patch:
 * fixes bug 4529: !EBIT_TEST(entry->flags, ENTRY_FWD_HDR_WAIT)
   assertion in FwdState.cc.

 * when splicing transparent connections during SslBump step1, avoid
   access-logging an extra record and log %ssl::bump_mode as the expected
   "splice" not "none".

 * handles an XXX comment inside clientTunnelOnError for possible memory
   leak of client streams related objects

 * fixes TunnelStateData logging in the case of splicing after peek.

This is a Measurement Factory project.

8 years agoOptimize appending to empty SBufs, a common use case.
Alex Rousskov [Thu, 3 Nov 2016 13:57:02 +0000 (02:57 +1300)] 
Optimize appending to empty SBufs, a common use case.

Most appends start with an empty buffer. Some append only once. There
is no reason to allocate new memory for that first append or force the
appender to write code to optimize that first append.

Why also check that SBuf has never been configured or altered then? To
preserve pre-allocated SBufs, such as those [ab]used as I/O buffers.