pld-builder.new: PLD_Builder/request_handler.py Split error messages.

arekm arekm at pld-linux.org
Sun Aug 16 15:32:57 CEST 2009


Author: arekm                        Date: Sun Aug 16 13:32:57 2009 GMT
Module: pld-builder.new               Tag: HEAD
---- Log message:
Split error messages.

---- Files affected:
pld-builder.new/PLD_Builder:
   request_handler.py (1.46 -> 1.47) 

---- Diffs:

================================================================
Index: pld-builder.new/PLD_Builder/request_handler.py
diff -u pld-builder.new/PLD_Builder/request_handler.py:1.46 pld-builder.new/PLD_Builder/request_handler.py:1.47
--- pld-builder.new/PLD_Builder/request_handler.py:1.46	Wed Jul 22 05:47:23 2009
+++ pld-builder.new/PLD_Builder/request_handler.py	Sun Aug 16 15:32:52 2009
@@ -161,12 +161,15 @@
         log.alert('Empty body received. Filename: %s' % filename)
         return False
 
+    keys = gpg.get_keys(req)
     (em, body) = gpg.verify_sig(req)
+    if not em:
+        log.alert("Invalid signature, missing/untrusted key. Keys in gpg batch: '%s'" % keys
+        return False
     user = acl.user_by_email(em)
     if user == None:
         # FIXME: security email here
-        keys = gpg.get_keys(req)
-        log.alert("Invalid signature, missing/untrusted key, or '%s' not in acl. Keys in gpg batch: '%s'" % (em, keys))
+        log.alert("'%s' not in acl. Keys in gpg batch: '%s'" % (em, keys))
         return False
 
     acl.set_current_user(user)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/pld-builder.new/PLD_Builder/request_handler.py?r1=1.46&r2=1.47&f=u



More information about the pld-cvs-commit mailing list