[buildinfo.debian.net] 31/35: GPG signatures are now mandatory (Closes: #7)

Chris Lamb chris at chris-lamb.co.uk
Thu Nov 3 19:02:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository buildinfo.debian.net.

commit 23601f00bb9044cea7778df85a62b5bd5e1332f6
Author: Chris Lamb <lamby at debian.org>
Date:   Tue Nov 1 19:55:16 2016 +0000

    GPG signatures are now mandatory (Closes: #7)
    
    Signed-off-by: Chris Lamb <lamby at debian.org>
---
 bidb/api/utils.py             | 22 ++++++++++++----------
 templates/static/landing.html | 13 +------------
 2 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/bidb/api/utils.py b/bidb/api/utils.py
index aa6cb20..6475816 100644
--- a/bidb/api/utils.py
+++ b/bidb/api/utils.py
@@ -27,18 +27,20 @@ def parse_submission(request):
     raw_text_gpg_stripped = data.dump()
 
     ## Parse GPG info #########################################################
-    uid = ''
+
+    uid = None
     data.raw_text = raw_text
     gpg_info = data.get_gpg_info()
-    if 'NODATA' not in gpg_info:
-        for x in ('VALIDSIG', 'NO_PUBKEY'):
-            try:
-                uid = gpg_info[x][0]
-                break
-            except (KeyError, IndexError):
-                pass
-        else:
-            raise InvalidSubmission("Could not determine GPG uid")
+
+    for x in ('VALIDSIG', 'NO_PUBKEY'):
+        try:
+            uid = gpg_info[x][0]
+            break
+        except (KeyError, IndexError):
+            pass
+
+    if uid is None:
+        raise InvalidSubmission("Could not determine GPG uid")
 
     ## Check whether .buildinfo already exists ################################
 
diff --git a/templates/static/landing.html b/templates/static/landing.html
index d65d3d2..26664a9 100644
--- a/templates/static/landing.html
+++ b/templates/static/landing.html
@@ -73,17 +73,6 @@
       </h4>
       <p>
         <code>
-          $ curl-X PUT --data-binary @- --max-time 30 {{ settings.SITE_URL }}{% url "api:submit" %} < <em>my.buildinfo</em>
-        </code>
-      </p>
-
-      <br>
-
-      <h4>
-        Upload a GPG-signed <code>.buildinfo</code>:
-      </h4>
-      <p>
-        <code>
           $ gpg --output=- --clearsign <em>my.buildinfo</em> | curl -X PUT --max-time 30 --data-binary @- {{ settings.SITE_URL }}{% url "api:submit" %}
         </code>
       </p>
@@ -91,7 +80,7 @@
       <br>
 
       <h4>
-        Upload a GPG-signed <code>.buildinfo</code> with optional <code>?node=X</code> metadata:
+        Submit a <code>.buildinfo</code> with optional <code>?node=X</code> metadata:
       </h4>
       <p>
         <code>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/buildinfo.debian.net.git



More information about the Reproducible-commits mailing list