]> 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)
committerAmos Jeffries <yadij@users.noreply.github.com>
Wed, 23 Aug 2023 12:37:10 +0000 (00:37 +1200)
commit6695897990071a277aad797b9ed30a4746f5c4c0
tree7cd7dcc9e05a933206ae7ab1b9aa2839f7a56833
parenta1e3c2ebdce50aa109f6d3ca65f566209db7f304
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