]> git.ipfire.org Git - thirdparty/squid.git/commit
CacheManager: require /squid-internal-mgr/ URL path prefix (#1426)
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 30 Jul 2023 13:36:41 +0000 (13:36 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 30 Jul 2023 21:27:44 +0000 (21:27 +0000)
commit3c383cc371e7ad69c533e629c6997f325aa3752d
treecdc7161d3f659ded6b5786dddf8a16088e905c04
parent8ee00d732cb2e3faab4f5f116ee13271f7ee20d1
CacheManager: require /squid-internal-mgr/ URL path prefix (#1426)

    ERROR: Squid BUG: assurance failed: tok.skip(internalMagicPrefix)
    exception location: cache_manager.cc(173) ParseUrl

Due to poor code duplication, commit 92a5adb accidentally classified
URLs without a trailing slash in the magical prefix as valid cache
manager URLs, triggering the above ERRORs. We were denying such
"slashless" cache manager URLs (as invalid internal URLs) prior to that
commit. Since that commit, the ERRORs triggered by that commit
effectively denied them as well. Denying them properly results in
simpler/smaller code (than allowing them would), so we should avoid a UI
change and continue to deny them, at least for now.

This change also reduces duplication of magic prefix definitions. Other
pending work will completely eliminate that duplication in src/ code.
src/CacheManager.h
src/Makefile.am
src/cache_manager.cc
src/internal.cc
src/tests/testCacheManager.cc