Skip to content

Commit

Permalink
Remove Edge Side Include (ESI) protocol (#1905)
Browse files Browse the repository at this point in the history
ESI feature has a number of bugs and security vulnerabilities.
It is also rarely used and a survey of active community members
has not revealed a need to keep maintaining this code.
  • Loading branch information
yadij authored and squid-anubis committed Sep 22, 2024
1 parent fdc5bf7 commit 5eb89ef
Show file tree
Hide file tree
Showing 63 changed files with 28 additions and 7,708 deletions.
9 changes: 0 additions & 9 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -1522,15 +1522,6 @@ src/auth/ntlm/smb_lm/:

==============================================================================

src/esi/Libxml2Parser.cc,
src/esi/Libxml2Parser.h:

* The ESI Libxml2 parser is Copyright (c) 2004 by Joachim Bauch
* http://www.joachim-bauch.de
* [email protected]

==============================================================================

src/external_acl.c:

Copyright (C) 2002 MARA Systems AB, Sweden <[email protected]>
Expand Down
35 changes: 0 additions & 35 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -817,38 +817,6 @@ AC_ARG_ENABLE(delay-pools,
dnl disable generic/common adaptation support by default
squid_opt_use_adaptation=no

AH_TEMPLATE([USE_SQUID_ESI],[whether to enable ESI processing])
AC_ARG_ENABLE(esi,[
AS_HELP_STRING([--enable-esi],
[Enable ESI for accelerators. ESI requires expat or xml2 library.
Enabling ESI will cause squid reverse proxies to be capable
of the Edge Acceleration Specification (www.esi.org).])
],[
SQUID_DEFINE_BOOL(USE_SQUID_ESI,$enable_esi)
])
AC_MSG_NOTICE([Enable ESI processor: ${enable_esi:=no (auto)}])

# ESI support libraries: expat
SQUID_AUTO_LIB(expat,[ESI expat library],[LIBEXPAT])
SQUID_CHECK_LIB_WORKS(expat,[
PKG_CHECK_MODULES([LIBEXPAT],[expat],[:],[:])
CPPFLAGS="$LIBEXPAT_CFLAGS $CPPFLAGS"
AC_CHECK_HEADERS(expat.h)
])

# ESI support libraries: xml2
SQUID_AUTO_LIB(xml2,[ESI xml2 library],[LIBXML2])
SQUID_CHECK_LIB_WORKS(xml2,[
PKG_CHECK_MODULES([LIBXML2],[libxml-2.0],[:],[:])
CPPFLAGS="$LIBXML2_CFLAGS $CPPFLAGS"
AC_CHECK_HEADERS(libxml/parser.h libxml/HTMLparser.h libxml/HTMLtree.h)
])

AS_IF([test "x$enable_esi" = "xyes" -a "x$LIBXML2_LIBS" = "x" -a "x$LIBEXPAT_LIBS" = "x"],[
AC_MSG_ERROR([ESI processor requires libxml2 or libexpat])
])
AM_CONDITIONAL(ENABLE_ESI,[test "x$enable_esi" = "xyes"])

AC_ARG_ENABLE(icap-client,
AS_HELP_STRING([--disable-icap-client],[Disable the ICAP client.]),[
SQUID_YESNO([$enableval],[--enable-icap-client])
Expand Down Expand Up @@ -2519,8 +2487,6 @@ AC_CONFIG_FILES([
errors/Makefile
icons/Makefile
lib/Makefile
lib/libTrie/Makefile
lib/libTrie/test/Makefile
lib/ntlmauth/Makefile
lib/rfcnb/Makefile
lib/smblib/Makefile
Expand Down Expand Up @@ -2587,7 +2553,6 @@ AC_CONFIG_FILES([
src/DiskIO/IpcIo/Makefile
src/DiskIO/Mmapped/Makefile
src/error/Makefile
src/esi/Makefile
src/eui/Makefile
src/format/Makefile
src/fs/Makefile
Expand Down
7 changes: 0 additions & 7 deletions doc/Programming-Guide/03_MajorComponents.dox
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,4 @@ TODO: get RFCs linked from ietf
see (http://squid.nlanr.net/Squid/urn-support.html) URN Support in Squid
.

\section ESI ESI
\par
ESI is an implementation of Edge Side Includes (http://www.esi.org).
ESI is implemented as a client side stream and a small
modification to client_side_reply.c to check whether
ESI should be inserted into the reply stream or not.

*/
2 changes: 0 additions & 2 deletions doc/debug-sections.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ section 83 TLS Server/Peer negotiation
section 83 TLS session management
section 84 Helper process maintenance
section 85 Client-side Request Routines
section 86 ESI Expressions
section 86 ESI processing
section 87 Client-side Stream routines.
section 88 Client-side Reply Routines
section 89 EUI-48 Lookup
Expand Down
16 changes: 13 additions & 3 deletions doc/release-notes/release-7.sgml.in
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ This section gives an account of those changes in three categories:
<sect1>Removed directives<label id="removeddirectives">
<p>
<descrip>
<tag>esi_parser</tag>
<p>Edge Side Includes (ESI) protocol is no longer supported natively.

<tag>mcast_miss_addr</tag>
<p>The corresponding code has not built for many years, indicating that the
feature is unused.
Expand Down Expand Up @@ -257,9 +260,7 @@ This section gives an account of those changes in three categories:
<sect1>Changes to existing options<label id="modifiedoptions">
<p>
<descrip>
<tag>--disable-esi</tag>
<p>The ESI feature is now disabled by default.
Use <em>--enable-esi</em> if needed.
<p>No build options have changed behaviour in this version.

</descrip>
</p>
Expand All @@ -270,9 +271,18 @@ This section gives an account of those changes in three categories:
<tag>--enable-cachemgr-hostname=</tag>
<p>The <em>cachemgr.cgi</em> tool this option relates to has been removed.

<tag>--enable-esi</tag>
<p>Edge Side Includes (ESI) protocol is no longer supported natively.

<tag>--without-expat</tag>
<p>The ESI feature using libexpat has been removed.

<tag>--without-gnugss</tag>
<p>Renamed to <em>--without-gss</em>.

<tag>--without-xml2</tag>
<p>The ESI feature using libxml2 has been removed.

<tag>CPPFLAGS=-DHEADERS_LOG</tag>
<p>The code enabled by this preprocessor macro has not built for many
years, indicating that the feature is unused.
Expand Down
3 changes: 0 additions & 3 deletions lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ include $(top_srcdir)/src/Common.am
SUBDIRS=
EXTRA_DIST=

if ENABLE_ESI
SUBDIRS += libTrie
endif
if ENABLE_SNMP
SUBDIRS += snmplib
endif
Expand Down
21 changes: 0 additions & 21 deletions lib/libTrie/Makefile.am

This file was deleted.

44 changes: 0 additions & 44 deletions lib/libTrie/Trie.cc

This file was deleted.

75 changes: 0 additions & 75 deletions lib/libTrie/Trie.h

This file was deleted.

49 changes: 0 additions & 49 deletions lib/libTrie/TrieCharTransform.h

This file was deleted.

52 changes: 0 additions & 52 deletions lib/libTrie/TrieNode.cc

This file was deleted.

Loading

0 comments on commit 5eb89ef

Please sign in to comment.