]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Avoid regression in the size of XML input that we will accept.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 28 Jul 2025 20:50:41 +0000 (16:50 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 28 Jul 2025 20:50:41 +0000 (16:50 -0400)
commit71c0921b649d7a800eb2d6f93539890eaa14d979
tree231aba981b73a69186c4dcb40027683e3c1358ea
parentd5b9b2d40262f57f58322ad49f8928fd4a492adb
Avoid regression in the size of XML input that we will accept.

This mostly reverts commit 6082b3d5d, "Use xmlParseInNodeContext
not xmlParseBalancedChunkMemory".  It turns out that
xmlParseInNodeContext will reject text chunks exceeding 10MB, while
(in most libxml2 versions) xmlParseBalancedChunkMemory will not.
The bleeding-edge libxml2 bug that we needed to work around a year
ago is presumably no longer a factor, and the argument that
xmlParseBalancedChunkMemory is semi-deprecated is not enough to
justify a functionality regression.  Hence, go back to doing it
the old way.

Reported-by: Michael Paquier <michael@paquier.xyz>
Author: Michael Paquier <michael@paquier.xyz>
Co-authored-by: Erik Wienhold <ewie@ewie.name>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/aIGknLuc8b8ega2X@paquier.xyz
Backpatch-through: 13
src/backend/utils/adt/xml.c