Commit 41206d1
committed
Handle GnuPG 2.4.9
GnuPG 2.4.9 fixes possible memory corruption in armor parsing[0] it appears
that this has also changed the warnings emitted. This test now fails:
t/seecurity/CVE-2012-4735-incoming-encryption-header.t .. # GnuPG --homedir /tmp/xqR91djkdB
ok 1 - created a ticket
ok 2 - loaded ticket
ok 3 - Found the right attachment
ok 4 - Incoming encryption header is removed
ok 5 - Incoming signature header is removed
ok 6 - created a ticket
ok 7 - GnuPG warning
ok 8 - GnuPG warning
not ok 9 - GnuPG warning
# Failed test 'GnuPG warning'
# at t/security/CVE-2012-4735-incoming-encryption-header.t line 65.
# 'Failure during GnuPG gpg-exit: Failed to gpg-exit
# '
# doesn't match '(?^:Failure during GnuPG data: No data has been found\. The reason is 'No armored data')'
ok 10 - loaded ticket
ok 11 - Found the right attachment
ok 12 - Incoming encryption header is removed
ok 13 - Incoming signature header is removed
ok 14 - no warnings
1..14
These are the warnings emitted:
$VAR1 = [
'gpg: keybox \'/tmp/rRZPP1xcq3/pubring.kbx\' created
gpg: invalid radix64 character 5F skipped
gpg: invalid radix64 character 5F skipped
gpg: invalid radix64 character 2E skipped
gpg: [don\'t know]: invalid packet (ctb=4e)
',
'Failure during GnuPG data: No data has been found. The reason is \'Invalid packet found\'
',
'Failure during GnuPG gpg-exit: Failed to gpg-exit
'
];
Let's only look for the 'No armored data' on < 2.4.9.
Reported in Debian as part of our regular QA processes:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1130943
[0] https://github.com/gpg/gnupg/blob/6cd241007f390a4be8f18982783e79e7cfb42c5f/NEWS#L11 parent 78c1b95 commit 41206d1
2 files changed
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 64 | + | |
| 65 | + | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
70 | 77 | | |
71 | 78 | | |
72 | 79 | | |
| |||
0 commit comments