]> git.ipfire.org Git - thirdparty/squid.git/commit - src/cache_manager.cc
Bug 5106: Broken cache manager URL parsing (#788)
authorAmos Jeffries <yadij@users.noreply.github.com>
Fri, 30 Apr 2021 05:15:44 +0000 (05:15 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 30 Apr 2021 12:52:41 +0000 (12:52 +0000)
commit26e65059bc06ebce508737b5cd0866478691566a
tree36eeb7457174bd4fbfd15c56e17bb2ac4da169f1
parent7ec92ef018e91cf93a4a683c6ec55b8e616216b2
Bug 5106: Broken cache manager URL parsing (#788)

Use already parsed request-target URL in cache manager and
update CacheManager to Tokanizer based URL parse

Removing use of sscan() and regex string processing which have
proven to be problematic on many levels. Most particularly with
regards to tolerance of normally harmless garbage syntax in URLs
received.

Support for generic URI schemes is added possibly resolving some
issues reported with ftp:// URL and manager access via ftp_port
sockets.

Truly generic support for /squid-internal-mgr/ path prefix is
added, fixing some user confusion about its use on cache_object:
scheme URLs.

TODO: support for single-name parameters and URL #fragments
are left to future updates. As is refactoring the QueryParams
data storage to avoid SBuf data copying.
src/CacheManager.h
src/cache_manager.cc
src/mgr/QueryParams.cc
src/mgr/QueryParams.h
src/tests/stub_libmgr.cc
src/tests/testCacheManager.cc
src/tests/testCacheManager.h