Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPtLO-00Ey3u-NS for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Jan 2024 23:59:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rPtLN-0098MY-Ot for pgsql-bugs@arkaria.postgresql.org; Tue, 16 Jan 2024 23:59:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPtLM-0098MC-0K for pgsql-bugs@lists.postgresql.org; Tue, 16 Jan 2024 23:59:45 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rPtLI-001tgt-CT for pgsql-bugs@lists.postgresql.org; Tue, 16 Jan 2024 23:59:42 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 369495C00DF; Tue, 16 Jan 2024 18:59:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 16 Jan 2024 18:59:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1705449579; x=1705535979; bh=yN2Pfq8Lat lqIVyyEzXWxlLs64qWKKckfcrClqGM/8U=; b=WGoJAWonTk8EOajDAHva8XwzeN 0CuVayZllKazdsYIXIKCkvDIoGPY2X4wWVKRYSiX/GDSRtqamY7H6I3kz/RvX9gy xMktz881AIWTmzwgOjyCsN/JM2TbFWPAQK9m2hW/3hk0HLL8+airSlDbQfjfSyEl FYNjDmZJ7Tp26kN7pAf1SHCXiEpwuW5Z75p/xQ+5YMv8o032B0bC40apIAv/lRlQ 4zS89I1Lt8WU3ZgQHf3/2Q7IbqOGsDcV9LXrKWP2wK+uIbbYMWntjq9MWHHDMfLU 0hmvvzLlv7yIOmJL/x6Goa1lvx3HjfUCMNnIcND4lZb4hLG6FY4UlPJPQi3g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1705449579; x=1705535979; bh=yN2Pfq8LatlqIVyyEzXWxlLs64qW KKckfcrClqGM/8U=; b=oZ762Xm15fhZuPN+Lxt4A7s0h3jV3hXJmV3ihR4WKvwi UUk/uUsuCSTib2B/NWyT/ndkzvmremjCRbM87zNF0xmf6MW4J1qhfTTBqhI+da0V H59mhlGJRnyouq1+HENO2X0m/a8ubHYaHf7l+2JxdJ6frwX5BrWuFe/pZnfP11Ji Uqsdth9ZHwuSWhtUozcH8y7B+VLBw9DraEF/NX56QfNDiczX08rzlZdt5RqGyZyx bw5Lmvb/XirwagT6+iEX1bhzyB4FpVH9GSmMIkFVdW2jn7WE62vTp4jg869XzqF8 8KXlrbNWS+0UzEpbW2W6uLV54l73bQ6maagVpyExKw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdejgedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 16 Jan 2024 18:59:37 -0500 (EST) Date: Wed, 17 Jan 2024 08:59:26 +0900 From: Michael Paquier To: Dmitry Koval Cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18274: Error 'invalid XML content' Message-ID: 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> <35ef78f9-8958-4225-ae7e-aead71b0feed@postgrespro.ru> <24e7412a-890c-46e3-b17d-addc39ff813f@postgrespro.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DCoGp3bdynbGrWpD" Content-Disposition: inline In-Reply-To: <24e7412a-890c-46e3-b17d-addc39ff813f@postgrespro.ru> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --DCoGp3bdynbGrWpD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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). >=20 > Comment expanded (see src/backend/utils/adt/xml.c). >=20 >> - The top comment of xml_parse() still mentions >> xmlParseBalancedChunkMemory() as an effect of 483bdb2afec9, so this >> needs to be updated. >=20 > 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. >=20 > 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 =66rom your v2 and applied it on HEAD. Let's see how it goes. -- Michael --DCoGp3bdynbGrWpD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmWnGF4ACgkQnvQgOdby QH3QThAAhZXd7bJ4h1Q4k/2ShVWOSxt/QWCVTTnaWGjwmXxEviS9vHZUIo8rVArL Eac/5Sy96tH/6CLI3Mjf6zu3+MzB5A9pWMm159+UaKhyqitrPeuP5/5PuBb0etQu sqrogGu2ct9Ni0UGhZ1e+cxOrVldxMHhI2VkHhYL0q/I9u6D0fgLaWwsylAV52YT /E3suGRvs2s4A1+XyvLLaT5IEabfVTfffmM30JirJb0ddHPX18HGOQ55evSMQCXr HYFqqz/KhDMOzYn8qTtx1udlSTQZz+cZrenjMYtwVjLh137hlHBqR9WDjX/WsIpS Vf7Cvf6xlY/5o5sIxNJ84bNW9a72ssAEGMus/BVZ2wpU2J9A/db4YpA9l1iYfrs8 Tujmf0LnDjUbSX7aZqQIg03OypldfDBVyzTaSgJAMVUTH0ETMC1PMh3qgcKrWJsE gswBVIViUMmSmt84MSMQE64vY75T3Iax+LbEJl91X7f2fOxeARjwgpG+fZOV5WxI Ofhq2c0wLtL1na43vyvv5YvJCq9K8gsqJC1UKgr2D+VPk6y7Gtcy3F7PBf3b5aGv Av1F1lWimNkXYKB43JyejglIq00/H0fUYLc3CcvqY8VhL8UWUubP9QcO20A1QPl9 DeXr+0bHTxPpolQJfkxxigMyndC5BvljWgu4d/IuUGjHE4uFsz4= =9eAi -----END PGP SIGNATURE----- --DCoGp3bdynbGrWpD--