Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use undecoded body text in decode and get_decrypt_key.

This is intended as a fix for RT #60246 and Debian Bug #592503
  • Loading branch information...
commit b9bdabbb94eceee4d19c1a5c4a0c207f5970a4fb 1 parent e487245
@bremner bremner authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/Mail/GnuPG.pm
View
8 lib/Mail/GnuPG.pm
@@ -140,9 +140,9 @@ sub decrypt {
m!application/pgp-encrypted!;
$ciphertext = $message->parts(1)->stringify_body;
}
- elsif ($message->body_as_string
+ elsif ($message->bodyhandle->as_string
=~ m!^-----BEGIN PGP MESSAGE-----!m ) {
- $ciphertext = $message->body_as_string;
+ $ciphertext = $message->bodyhandle->as_string;
$armor_message = 1;
}
else {
@@ -254,9 +254,9 @@ sub get_decrypt_key {
m!application/pgp-encrypted!;
$ciphertext = $message->parts(1)->stringify_body;
}
- elsif ($message->body_as_string
+ elsif ($message->bodyhandle->as_string
=~ m!^-----BEGIN PGP MESSAGE-----!m ) {
- $ciphertext = $message->body_as_string;
+ $ciphertext = $message->bodyhandle->as_string;
}
else {
die "Unknown Content-Type or no PGP message in body"
Please sign in to comment.
Something went wrong with that request. Please try again.