Re: BUG #18274: Error 'invalid XML content' - Mailing list pgsql-bugs

From Dmitry Koval
Subject Re: BUG #18274: Error 'invalid XML content'
Date
Msg-id 24e7412a-890c-46e3-b17d-addc39ff813f@postgrespro.ru
Whole thread Raw
In response to Re: BUG #18274: Error 'invalid XML content'  (Michael Paquier <michael@paquier.xyz>)
Responses Re: BUG #18274: Error 'invalid XML content'  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
Hi!

Thanks for the recommendations.

 >- 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.

 >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.

[1]https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-parser.html#xmlSubstituteEntitiesDefault

-- 
With best regards,
Dmitry Koval

Postgres Professional: http://postgrespro.com
Attachment

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #18298: some possible issues in postgres10.23 that caused the crash
Next
From: Dave Cramer
Date:
Subject: Re: BUG #18294: Manual savepoints do not work with JDBC param cleanupSavepoints=true