projects
/
mirror
/
userdir-ldap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b00b7ee
)
More lax with mime
author
Peter Palfrader
<peter@palfrader.org>
Sat, 21 May 2011 13:41:47 +0000
(15:41 +0200)
committer
Peter Palfrader
<peter@palfrader.org>
Sat, 21 May 2011 13:41:47 +0000
(15:41 +0200)
userdir_gpg.py
patch
|
blob
|
history
diff --git
a/userdir_gpg.py
b/userdir_gpg.py
index
b84a76d
..
d89b78e
100644
(file)
--- a/
userdir_gpg.py
+++ b/
userdir_gpg.py
@@
-108,10
+108,10
@@
def GetClearSig(Msg, Paranoid = 0, lax_multipart = False):
(Signed, Signature) = payloads
(Signed, Signature) = payloads
- if Signed.get_content_type() != "text/plain":
- raise UDFormatError, "Invalid pgp/mime encoding [wrong plaintext type]";
+ if Signed.get_content_type() != "text/plain"
and not lax_multipart
:
+ raise UDFormatError, "Invalid pgp/mime encoding
for first part
[wrong plaintext type]";
if Signature.get_content_type() != "application/pgp-signature":
if Signature.get_content_type() != "application/pgp-signature":
- raise UDFormatError, "Invalid pgp/mime encoding [wrong signature type]";
+ raise UDFormatError, "Invalid pgp/mime encoding
for second part
[wrong signature type]";
# Append the PGP boundary header and the signature text to re-form the
# original signed block [needs to convert to \r\n]
# Append the PGP boundary header and the signature text to re-form the
# original signed block [needs to convert to \r\n]