]> git.ipfire.org Git - thirdparty/squid.git/commit - src/auth/digest/Config.cc
Smarter auth_param utf8 handling, including CP1251 support (#480)
authorSergey Kirpa <44341362+Sergey-Kirpa@users.noreply.github.com>
Mon, 23 Dec 2019 08:01:21 +0000 (08:01 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Mon, 23 Dec 2019 08:01:27 +0000 (08:01 +0000)
commit7e851a3e58d6e132ae5ad558bc5e111ce0e90c00
tree78877264b5130753d29af76d6c92886dfca9c5dc
parent6c1219b9a2ac351fc0b5fe1d1e3fef2ce4f91e6d
Smarter auth_param utf8 handling, including CP1251 support (#480)

When forwarding authentication credentials to authentication helpers:

* With auth_param utf8 parameter: Squid assumed that the received
  credentials are encoded with Latin-1 (and re-encoded them with UTF-8).
  This assumption is wrong for Internet Explorer running with CP1251
  regional settings. Now Squid uses HTTP Accept-Language request header
  to guess the received credentials encoding (Latin-1, CP1251, or UTF-8)
  and converts the first two encodings into UTF-8.

* Without auth_param utf8 parameter: No changes. Squid sends credentials
  in their original encoding, only applying RFC 1738 escaping on top.

Chrome and Firefox should not be affected because they always use UTF-8
encoding when sending authentication credentials.
18 files changed:
lib/Makefile.am
lib/charset.c [deleted file]
src/auth/Makefile.am
src/auth/SchemeConfig.cc
src/auth/SchemeConfig.h
src/auth/basic/Config.cc
src/auth/basic/Config.h
src/auth/basic/UserRequest.cc
src/auth/digest/Config.cc
src/auth/digest/Config.h
src/auth/digest/UserRequest.cc
src/auth/negotiate/Config.cc
src/auth/negotiate/Config.h
src/auth/ntlm/Config.cc
src/auth/ntlm/Config.h
src/auth/toUtf.cc [new file with mode: 0644]
src/auth/toUtf.h [moved from include/charset.h with 53% similarity]
src/cf.data.pre