Skip to content

Commit 5bda640

Browse files
author
Karina Litskevich
committed
[PGPRO-14880] Fix sequrity test due to changes in reporting of errors
See PostgreSQL commit 774171c4 Tags: rum
1 parent d4ddc0c commit 5bda640

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

expected/security.out

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* ------------------------------------
3+
* NOTE: This test behaves differenly
4+
* ------------------------------------
5+
*
6+
* Since 774171c4f64 (>=18) reporting of errors in extension script files
7+
* is more detailed.
8+
*
9+
* security.out - test output for PostgreSQL (<18)
10+
* security_1.out - test output for PostgreSQL (>=18)
11+
*
12+
*/
113
-- Check security CVE-2020-14350
214
CREATE FUNCTION rum_anyarray_similar(anyarray,anyarray) RETURNS bool AS $$ SELECT false $$ LANGUAGE SQL;
315
CREATE EXTENSION rum;

expected/security_1.out

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* ------------------------------------
3+
* NOTE: This test behaves differenly
4+
* ------------------------------------
5+
*
6+
* Since 774171c4f64 (>=18) reporting of errors in extension script files
7+
* is more detailed.
8+
*
9+
* security.out - test output for PostgreSQL (<18)
10+
* security_1.out - test output for PostgreSQL (>=18)
11+
*
12+
*/
13+
-- Check security CVE-2020-14350
14+
CREATE FUNCTION rum_anyarray_similar(anyarray,anyarray) RETURNS bool AS $$ SELECT false $$ LANGUAGE SQL;
15+
CREATE EXTENSION rum;
16+
ERROR: function "rum_anyarray_similar" already exists with same argument types
17+
CONTEXT: SQL statement "CREATE FUNCTION rum_anyarray_similar(anyarray,anyarray)
18+
RETURNS bool
19+
AS '$libdir/rum'
20+
LANGUAGE C STRICT STABLE"
21+
extension script file "rum--1.3.sql", near line 1530
22+
DROP FUNCTION rum_anyarray_similar(anyarray,anyarray);

sql/security.sql

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/*
2+
* ------------------------------------
3+
* NOTE: This test behaves differenly
4+
* ------------------------------------
5+
*
6+
* Since 774171c4f64 (>=18) reporting of errors in extension script files
7+
* is more detailed.
8+
*
9+
* security.out - test output for PostgreSQL (<18)
10+
* security_1.out - test output for PostgreSQL (>=18)
11+
*
12+
*/
13+
114
-- Check security CVE-2020-14350
215
CREATE FUNCTION rum_anyarray_similar(anyarray,anyarray) RETURNS bool AS $$ SELECT false $$ LANGUAGE SQL;
316
CREATE EXTENSION rum;

0 commit comments

Comments
 (0)