From c6eced09b25d12d73b93a740f2d81c22bb7e3d1f Mon Sep 17 00:00:00 2001 From: Kevin Grittner Date: Mon, 14 Dec 2015 11:46:47 -0600 Subject: [PATCH] Remove xmlparse(document '') test This one test was behaving differently between the ubuntu fix for CVE-2015-7499 and the base "expected" file. It's not worth having yet another version of the expected file for this test, so drop it. Perhaps at some point when all distros have settled down to the same behavior on this test, it can be restored. Problem found by me on libxml2 (2.9.1+dfsg1-3ubuntu4.6). Solution suggested by Tom Lane. Backpatch to 9.5, where the test was added. --- src/test/regress/expected/xml.out | 11 ----------- src/test/regress/expected/xml_1.out | 4 ---- src/test/regress/expected/xml_2.out | 4 ---- src/test/regress/sql/xml.sql | 1 - 4 files changed, 20 deletions(-) diff --git a/src/test/regress/expected/xml.out b/src/test/regress/expected/xml.out index 9b2d264414..b451b63847 100644 --- a/src/test/regress/expected/xml.out +++ b/src/test/regress/expected/xml.out @@ -263,17 +263,6 @@ SELECT xmlparse(content ''); (1 row) -SELECT xmlparse(document ''); -ERROR: invalid XML document -DETAIL: line 1: switching encoding : no input - -^ -line 1: Document is empty - -^ -line 1: Start tag expected, '<' not found - -^ SELECT xmlparse(document ' '); ERROR: invalid XML document DETAIL: line 1: Start tag expected, '<' not found diff --git a/src/test/regress/expected/xml_1.out b/src/test/regress/expected/xml_1.out index c7fa526f9c..d7027030c3 100644 --- a/src/test/regress/expected/xml_1.out +++ b/src/test/regress/expected/xml_1.out @@ -204,10 +204,6 @@ SELECT xmlparse(content ''); ERROR: unsupported XML feature DETAIL: This functionality requires the server to be built with libxml support. HINT: You need to rebuild PostgreSQL using --with-libxml. -SELECT xmlparse(document ''); -ERROR: unsupported XML feature -DETAIL: This functionality requires the server to be built with libxml support. -HINT: You need to rebuild PostgreSQL using --with-libxml. SELECT xmlparse(document ' '); ERROR: unsupported XML feature DETAIL: This functionality requires the server to be built with libxml support. diff --git a/src/test/regress/expected/xml_2.out b/src/test/regress/expected/xml_2.out index 21d3de18b8..23c4e767f0 100644 --- a/src/test/regress/expected/xml_2.out +++ b/src/test/regress/expected/xml_2.out @@ -251,10 +251,6 @@ SELECT xmlparse(content ''); (1 row) -SELECT xmlparse(document ''); -ERROR: invalid XML document -DETAIL: line 1: switching encoding : no input -line 1: Document is empty SELECT xmlparse(document ' '); ERROR: invalid XML document DETAIL: line 1: Start tag expected, '<' not found diff --git a/src/test/regress/sql/xml.sql b/src/test/regress/sql/xml.sql index 88764c88cd..08a0b30067 100644 --- a/src/test/regress/sql/xml.sql +++ b/src/test/regress/sql/xml.sql @@ -71,7 +71,6 @@ SELECT xmlparse(content ''); SELECT xmlparse(content '&idontexist;'); SELECT xmlparse(content ''); -SELECT xmlparse(document ''); SELECT xmlparse(document ' '); SELECT xmlparse(document 'abc'); SELECT xmlparse(document 'x');