Skip site navigation (1) Skip section navigation (2)

BUG #4769: xmlconcat produces invalid xml values -> data corruption

From: "Arjen Nienhuis" <a(dot)g(dot)nienhuis(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4769: xmlconcat produces invalid xml values -> data corruption
Date: 2009-04-21 12:11:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      4769
Logged by:          Arjen Nienhuis
Email address:      a(dot)g(dot)nienhuis(at)gmail(dot)com
PostgreSQL version: 8.3.7
Operating system:   Ubuntu 8.10 and 9.04
Description:        xmlconcat produces invalid xml values -> data corruption

'<!DOCTYPE html><html/>' is a valid xml document but not a valid xml
fragment. xmlconcat does not check for this:

SELECT xmlconcat('foo', xmlparse(DOCUMENT '<!DOCTYPE html><html/>'));
 foo<!DOCTYPE html><html/>

The result is an invalid xml value that can end up in a table.


=> SELECT version();
 PostgreSQL 8.3.7 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.3.real
(Ubuntu 4.3.3-5ubuntu4) 4.3.3
(1 row)

libxml2 version is 2.6.32.dfsg-5ubuntu4


I tried to test this with 8.4 but the ubuntu ppa has depency problems.


pgsql-bugs by date

Next:From: Tom LaneDate: 2009-04-21 14:00:56
Subject: Re: bitfromint4() in v7.2.3 to bit() in v8.1?
Previous:From: Peter EisentrautDate: 2009-04-21 12:05:32
Subject: Re: BUG #4767: create operator - negator doesn't work

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group