commit c7934342e84017e49cc2f98771b15b260fcb1b20 Author: hiromipaw hiro@torproject.org 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)