]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix test "NUL byte in text decrypt" for --without-zlib builds.
authorNoah Misch <noah@leadboat.com>
Mon, 9 Feb 2026 17:08:10 +0000 (09:08 -0800)
committerNoah Misch <noah@leadboat.com>
Mon, 9 Feb 2026 17:08:10 +0000 (09:08 -0800)
Backpatch-through: 14
Security: CVE-2026-2006

contrib/pgcrypto/expected/pgp-decrypt.out
contrib/pgcrypto/expected/pgp-decrypt_1.out
contrib/pgcrypto/sql/pgp-decrypt.sql

index 1db89e8c00a56349ac8c31327303dd870d15f933..8ce6466f2e9a86f454e76ba77de242680b139101 100644 (file)
@@ -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
index d214e0bc0e08fb3d0a7f6d3f894e8a86e2598c27..ee57ad43cb75f94d2fb37718f7bde3cdd4cbd6a6 100644 (file)
@@ -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
index 2fe498f2f02e4bbd7eff714409a8833f655fe373..b499bf757b0d4f5b1973762f7212569f070b4535 100644 (file)
@@ -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