]> git.ipfire.org Git - thirdparty/squid.git/commit
ESI: Drop incorrect and unnecessary xmlSetFeature() call (#988)
authorNick Wellnhofer <wellnhofer@aevum.de>
Sun, 20 Feb 2022 19:42:40 +0000 (19:42 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 22 Feb 2022 19:45:52 +0000 (19:45 +0000)
commitc4e6b7c2a12fa218089fe839f769ffc8ae18dea4
tree17daa5c5bb9d11b4a8bb9711cfc34774ab4b50e4
parent460fd23260cd440c23a5685f8d7496b37c1121c7
ESI: Drop incorrect and unnecessary xmlSetFeature() call (#988)

xmlSetFeature() has been deprecated for 10+ years and will eventually be
removed from libxml2. Squid calls xmlSetFeature() with the wrong
argument: a nil `value` pointer instead of a pointer to a zero value.
When called with a nil `value`, the function does nothing but returning
an error. Squid does not check whether xmlSetFeature() call is
successful, and the bug went unnoticed since libxml2 support was added
in commit 964b44c.

Since libxml2 does not substitute entities by default, the call can be
removed to achieve the intended effect.
src/esi/Libxml2Parser.cc