]> git.ipfire.org Git - thirdparty/squid.git/commit
Violate RFC 2396 and 3986 URI handling requirements.
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 16 Jul 2015 05:09:30 +0000 (22:09 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 16 Jul 2015 05:09:30 +0000 (22:09 -0700)
commite47e0802cd75e90bdf81d52da518d35d643f6c1c
treed88c4c8e0d774d0fc5a3f118f42b6b18c6d34994
parent49d8cc6f6b62c7f9885cee44d6c7a4171baab146
Violate RFC 2396 and 3986 URI handling requirements.

For the past 17 years RFC 2396 has specified explicit
characters which are disallowed in any form of URI due
to their use in potential or real malware attacks
against network servers.

10 years ago RFC 3986 updated this by allowing some
previously disallowed characters, and moving to a model
of explicitly listing all characters allowed in each
segment of a URI with explicit %-encoding requirement
for all other characters.

Squid has recently been updated to parse that RFC 3986
syntax closely, with minimal tolerance for garbage as
outlined explicitly in RFC 7230.

However, various major corporations are still building
popular tools that violate the RFC 3986 Security
Considerations surrounding safe encoding of characters
in URI they transmit as HTTP request URLs.

This patch allows Squid with --enable-http-violations
(on by default) and configured for lenient parsing (on
by default) to accept a subset of characters which are
expressly forbidden but actively used un-encoded.

Malware attacks utilizing these characters to perform
URL-injection are mitigated by treating the client
request as an HTTP "0.9" protocol message. Such
messages are not permitted to use nonidempotent HTTP
methods which affect server state, and most Mime
headers from the client are ignored.
src/http/one/Parser.cc
src/http/one/Parser.h
src/http/one/RequestParser.cc