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 896d136  Match signature/checksum; allow override of tlp
896d136 is described below

commit 896d136728599272fbb24a96fffd314355d06f39
Author: Sebb <[email protected]>
AuthorDate: Wed Dec 18 23:39:33 2019 +0000

    Match signature/checksum; allow override of tlp
---
 tools/download_check.rb        |  6 ++++--
 www/members/download_check.cgi | 11 ++++++++++-
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/tools/download_check.rb b/tools/download_check.rb
index e872083..d3b45c8 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -244,6 +244,7 @@ VERIFY_TEXT = [
 ALIASES = {
     'sig' => 'asc',
     'pgp' => 'asc',
+    'signature' => 'asc',
 }
 # Convert text reference to extension
 # e.g. SHA256 => sha256; [SIG] => asc
@@ -362,7 +363,7 @@ def _checkDownloadPage(path, tlp, version)
         end
         tmp = text2ext(t)
         next if ext == tmp # i.e. link is just the type or [TYPE]
-        if not base == t
+        if not base == t and not t == 'checksum'
             E "Mismatch: #{h} and #{t}"
         end
     # These might also be direct links to mirrors
@@ -528,7 +529,8 @@ def doPost(options)
   $ARCHIVE_CHECK = options[:archivecheck]
   init
   url = options[:url]
-  tlp = getTLP(url)
+  tlp = options[:tlp]
+  tlp = getTLP(url) if tlp == ''
   if tlp
     checkDownloadPage(url, tlp, options[:version])
   end
diff --git a/www/members/download_check.cgi b/www/members/download_check.cgi
index 3d57939..05729a5 100755
--- a/www/members/download_check.cgi
+++ b/www/members/download_check.cgi
@@ -48,6 +48,14 @@ _html do
                 size: 50
             end
           end
+          _div.form_group do
+            _label.control_label.col_sm_2 'Page URL', for: 'tlp'
+            _div.col_sm_10 do
+              _input.form_control.name name: 'tlp', required: true,
+                placeholder: 'optional TLP override',
+                size: 50
+            end
+          end
 #          _div.form_group do
 #            _label.control_label.col_sm_2 'Version to check', for: 'version'
 #            _div.col_sm_10 do
@@ -86,10 +94,11 @@ _html do
           doPost(
             {
               url: @url,
+              tlp: @tlp,
               version: '', # TODO @version when implemented
               checklinks: @checklinks == 'true',
               nochecklinks: @nochecklinks == 'true',
-              archivecheck: @archivecheck == 'true'
+              archivecheck: @archivecheck == 'true',
             })
         end
       end

Reply via email to