Revert "Add support for parsing of large XML data (>= 10MB)"
authorMichael Paquier <michael@paquier.xyz>
Fri, 26 Jan 2024 01:15:32 +0000 (10:15 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 26 Jan 2024 01:15:32 +0000 (10:15 +0900)
commitf2743a7d70e7b2891277632121bb51e739743a47
tree795a8bef9c48060d83f8a24d2424573befdb3026
parent376c216138c75e161d39767650ea30536f23b482
Revert "Add support for parsing of large XML data (>= 10MB)"

This reverts commit 2197d06224a1, following a discussion over a Coverity
report where issues like the "Billion laugh attack" could cause the
backend to waste CPU and memory even if a client applied checks on the
size of the data given in input, and libxml2 does not offer guarantees
that input limits are respected under XML_PARSE_HUGE.

Discussion: https://postgr.es/m/ZbHlgrPLtBZyr_QW@paquier.xyz
contrib/xml2/xpath.c
contrib/xml2/xslt_proc.c
src/backend/utils/adt/xml.c