From: Michael Paquier <michael@paquier.xyz>
To: Dmitry Koval <d.koval@postgrespro.ru>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18274: Error 'invalid XML content'
Date: Wed, 17 Jan 2024 08:59:26 +0900
Message-ID: <ZacYXgM9A_CSLpD8@paquier.xyz> (raw)
In-Reply-To: <24e7412a-890c-46e3-b17d-addc39ff813f@postgrespro.ru>
References: <18274-98d16bc03520665f@postgresql.org>
<1616257.1704651529@sss.pgh.pa.us>
<5588db01-45be-48ff-b158-85f789bc502c@postgrespro.ru>
<1314313.1705259848@sss.pgh.pa.us>
<0eea123f-388a-41ea-9df3-d4606cf9ed8d@postgrespro.ru>
<ZaRvbaQ8V9uGxXGD@paquier.xyz>
<35ef78f9-8958-4225-ae7e-aead71b0feed@postgrespro.ru>
<ZaZI4WAHZ67ZHq7p@paquier.xyz>
<24e7412a-890c-46e3-b17d-addc39ff813f@postgrespro.ru>
On Tue, Jan 16, 2024 at 04:55:34PM +0300, Dmitry Koval wrote:
>> - Document in a comment why a fake root node is necessary (aka the
>> current routines don't give enough control over the limits you'd
>> like to enforce).
>
> Comment expanded (see src/backend/utils/adt/xml.c).
>
>> - The top comment of xml_parse() still mentions
>> xmlParseBalancedChunkMemory() as an effect of 483bdb2afec9, so this
>> needs to be updated.
>
> Updated.
I still need to evaluate a bit more this part, though that looks fine.
>> Also, it may be worth double-checking if there are other things marked
>> as deprecated in the upstream doc, and switch to "newer" things.
>
> I found another deprecated function xmlSubstituteEntitiesDefault [1]
> (contrib/xml2). xmlSubstituteEntitiesDefault was removed and added the
> XML_PARSE_NOENT flag in functions xmlReadMemory instead it.
This one had better be done first because it is required by your
original issue, and that's what could make the buildfarm shaky.
I have checked the other XML calls in the tree and did not spot
anything else that ought to be changed, so I have extracted this stuff
from your v2 and applied it on HEAD. Let's see how it goes.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../ZacYXgM9A_CSLpD8@paquier.xyz/2-signature.asc)
download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, d.koval@postgrespro.ru, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18274: Error 'invalid XML content'
In-Reply-To: <ZacYXgM9A_CSLpD8@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox