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 50d2c16  Also allow check signature
50d2c16 is described below

commit 50d2c1640420fdb0090fe425f7fe5305095b2c68
Author: Sebb <[email protected]>
AuthorDate: Mon Sep 28 16:35:01 2020 +0100

    Also allow check signature
---
 www/secretary/workbench/server.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/secretary/workbench/server.rb 
b/www/secretary/workbench/server.rb
index fb84e16..94250ab 100644
--- a/www/secretary/workbench/server.rb
+++ b/www/secretary/workbench/server.rb
@@ -123,8 +123,9 @@ post '/tasklist/:file' do
 end
 
 # posted actions
+SAFE_ACTIONS = %w[check-mail check-signature]
 post '/actions/:file' do
-  return [503, UNAVAILABLE] if UNAVAILABLE unless params[:file] == 'check-mail'
+  return [503, UNAVAILABLE] if UNAVAILABLE && 
!SAFE_ACTIONS.include?(params[:file])
 
   _json :"actions/#{params[:file]}"
 end

Reply via email to