]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: cache: don't cache when an Authorization header is present
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 22 May 2018 09:04:33 +0000 (11:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 May 2018 08:36:44 +0000 (10:36 +0200)
commit8a16fe0d053b93c00a8bcf86159135f98ca1377e
treef636465e1aaa8f10ef2345eec0f20985b001f25e
parentd5b073cf1fd455ee2613782fe1336690736f80e6
BUG/MEDIUM: cache: don't cache when an Authorization header is present

RFC 7234 says:

A cache MUST NOT store a response to any request, unless:
[...] the Authorization header field (see Section 4.2 of [RFC7235]) does
      not appear in the request, if the cache is shared, unless the
      response explicitly allows it (see Section 3.2), [...]

In this patch we completely disable the cache upon the receipt of an
Authorization header in the request. In this case it's not possible to
either use the cache or store into the cache anymore.

Thanks to Adam Eijdenberg of Digital Transformation Agency for raising
this issue.

This patch must be backported to 1.8.
doc/configuration.txt
src/proto_http.c