This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 9b798538 Better key check
9b798538 is described below

commit 9b79853854fa113dd7e2408898a2e322fd15f634
Author: Sebb <[email protected]>
AuthorDate: Sun Aug 25 20:28:28 2024 +0100

    Better key check
---
 www/secretary/workbench/views/actions/check-signature.json.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/secretary/workbench/views/actions/check-signature.json.rb 
b/www/secretary/workbench/views/actions/check-signature.json.rb
index 59b6755a..8ddcbc3d 100644
--- a/www/secretary/workbench/views/actions/check-signature.json.rb
+++ b/www/secretary/workbench/views/actions/check-signature.json.rb
@@ -105,7 +105,7 @@ def validate_sig(attachment, signature, msgid)
             '--batch', '--import', tmpfile
           # For later analysis
           Wunderbar.warn "#{gpg} --import #{tmpfile} rc=#{rc} out=#{out} 
err=#{err}"
-          if err.include? 'gpg: Signature made' # downloaded key is valid; 
store it for posterity TODO: better check
+          if err.include?('imported: 1') or err.include?('processed: 1') # 
downloaded key is valid; store it for posterity
             Dir.mktmpdir do |tmpdir|
               container = ASF::SVN.svnpath!('iclas', '__keys__')
               ASF::SVN.svn!('checkout',[container, tmpdir], {depth: 'empty', 
env: env})

Reply via email to