postgres.git / summary / log / commit / refs
commit 6f741bcb6aa4d78b2e3c96b6f3830b371c8cdf47
Author: Noah Misch <noah@leadboat.com>
Date: Mon Feb 09 17:08:10 2026 +0000
Fix test "NUL byte in text decrypt" for --without-zlib builds.
Backpatch-through: 14
Security: CVE-2026-2006
contrib/pgcrypto/expected/pgp-decrypt.out | 9 +++++----
contrib/pgcrypto/expected/pgp-decrypt_1.out | 9 +++++----
contrib/pgcrypto/sql/pgp-decrypt.sql | 9 +++++----
3 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/contrib/pgcrypto/expected/pgp-decrypt.out b/contrib/pgcrypto/expected/pgp-decrypt.out
index 1db89e8c00a..8ce6466f2e9 100644
--- a/contrib/pgcrypto/expected/pgp-decrypt.out
+++ b/contrib/pgcrypto/expected/pgp-decrypt.out
@@ -388,7 +388,8 @@ select pgp_sym_decrypt(pgp_sym_encrypt_bytea('P', 'key'), 'key', 'debug=1');
NOTICE: dbg: parse_literal_data: data type=b
ERROR: Not text data
-- NUL byte in text decrypt. Ciphertext source:
--- printf 'a\x00\xc' | gpg --homedir /nonexistent --textmode \
+-- printf 'a\x00\xc' | gpg --homedir /nonexistent \
+-- --personal-compress-preferences uncompressed --textmode \
-- --personal-cipher-preferences aes --no-emit-version --batch \
-- --symmetric --passphrase key --armor
do $$
@@ -396,9 +397,9 @@ begin
perform pgp_sym_decrypt(dearmor('
-----BEGIN PGP MESSAGE-----
-jA0EBwMCLd9OvySmZNZg0jgBe7vGTmnje5HGXI+zsIQ99WPZu4Zs/P6pQcZ+HZ4n
-SZQHOfE8tagjB6Rqow82QpSBiOfWn4qjhQ==
-=c2cz
+jA0EBwMCXLc8pozB10Fg0jQBVUID59TLvWutJp0j6eh9ZgjqIRzdYaIymFB8y4XH
+vu0YlJP5D5BX7yqZ+Pry7TlDmiFO
+=rV7z
-----END PGP MESSAGE-----
'), 'key', 'debug=1');
exception when others then
diff --git a/contrib/pgcrypto/expected/pgp-decrypt_1.out b/contrib/pgcrypto/expected/pgp-decrypt_1.out
index d214e0bc0e0..ee57ad43cb7 100644
--- a/contrib/pgcrypto/expected/pgp-decrypt_1.out
+++ b/contrib/pgcrypto/expected/pgp-decrypt_1.out
@@ -384,7 +384,8 @@ select pgp_sym_decrypt(pgp_sym_encrypt_bytea('P', 'key'), 'key', 'debug=1');
NOTICE: dbg: parse_literal_data: data type=b
ERROR: Not text data
-- NUL byte in text decrypt. Ciphertext source:
--- printf 'a\x00\xc' | gpg --homedir /nonexistent --textmode \
+-- printf 'a\x00\xc' | gpg --homedir /nonexistent \
+-- --personal-compress-preferences uncompressed --textmode \
-- --personal-cipher-preferences aes --no-emit-version --batch \
-- --symmetric --passphrase key --armor
do $$
@@ -392,9 +393,9 @@ begin
perform pgp_sym_decrypt(dearmor('
-----BEGIN PGP MESSAGE-----
-jA0EBwMCLd9OvySmZNZg0jgBe7vGTmnje5HGXI+zsIQ99WPZu4Zs/P6pQcZ+HZ4n
-SZQHOfE8tagjB6Rqow82QpSBiOfWn4qjhQ==
-=c2cz
+jA0EBwMCXLc8pozB10Fg0jQBVUID59TLvWutJp0j6eh9ZgjqIRzdYaIymFB8y4XH
+vu0YlJP5D5BX7yqZ+Pry7TlDmiFO
+=rV7z
-----END PGP MESSAGE-----
'), 'key', 'debug=1');
exception when others then
diff --git a/contrib/pgcrypto/sql/pgp-decrypt.sql b/contrib/pgcrypto/sql/pgp-decrypt.sql
index 2fe498f2f02..b499bf757b0 100644
--- a/contrib/pgcrypto/sql/pgp-decrypt.sql
+++ b/contrib/pgcrypto/sql/pgp-decrypt.sql
@@ -283,7 +283,8 @@ VsxxqLSPzNLAeIspJk5G
select pgp_sym_decrypt(pgp_sym_encrypt_bytea('P', 'key'), 'key', 'debug=1');
-- NUL byte in text decrypt. Ciphertext source:
--- printf 'a\x00\xc' | gpg --homedir /nonexistent --textmode \
+-- printf 'a\x00\xc' | gpg --homedir /nonexistent \
+-- --personal-compress-preferences uncompressed --textmode \
-- --personal-cipher-preferences aes --no-emit-version --batch \
-- --symmetric --passphrase key --armor
do $$
@@ -291,9 +292,9 @@ begin
perform pgp_sym_decrypt(dearmor('
-----BEGIN PGP MESSAGE-----
-jA0EBwMCLd9OvySmZNZg0jgBe7vGTmnje5HGXI+zsIQ99WPZu4Zs/P6pQcZ+HZ4n
-SZQHOfE8tagjB6Rqow82QpSBiOfWn4qjhQ==
-=c2cz
+jA0EBwMCXLc8pozB10Fg0jQBVUID59TLvWutJp0j6eh9ZgjqIRzdYaIymFB8y4XH
+vu0YlJP5D5BX7yqZ+Pry7TlDmiFO
+=rV7z
-----END PGP MESSAGE-----
'), 'key', 'debug=1');
exception when others then
[parent: deb464a40852]