[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [trac-email/master] Remove GPG signature from message body



commit c7934342e84017e49cc2f98771b15b260fcb1b20
Author: hiromipaw <hiro@xxxxxxxxxxxxxx>
Date:   Wed Dec 14 14:14:38 2016 +0100

    Remove GPG signature from message body
---
 notify.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/notify.py b/notify.py
index 9224231..5d8f886 100755
--- a/notify.py
+++ b/notify.py
@@ -28,9 +28,10 @@ def get_message_body(message):
         body = ''
         for payload in message.get_payload():
             body = body.join(payload.get_payload())
-        return body
+        return body.split('-----BEGIN PGP SIGNATURE-----')[0]
+
     else:
-        return message.get_payload()
+        return message.get_payload().split('-----BEGIN PGP SIGNATURE-----')[0]
 
 def verify_user_permissions(env, user, permission):
     ps = PermissionSystem(env)

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits