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 c4f9c202 Allow for _ in availid
c4f9c202 is described below

commit c4f9c20264c1ba49bc451767d44ffeca644744ee
Author: Sebb <[email protected]>
AuthorDate: Fri Feb 17 01:21:55 2023 +0000

    Allow for _ in availid
---
 www/members/proxy.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/members/proxy.cgi b/www/members/proxy.cgi
index 9c04fa96..943ec291 100755
--- a/www/members/proxy.cgi
+++ b/www/members/proxy.cgi
@@ -214,7 +214,7 @@ def emit_post(cur_mtg_dir, meeting, _)
                     {quiet: true, user: $USER, password: $PASSWORD})
       Dir.chdir(tmpdir) do
         # write proxy form
-        filename = "proxies-received/#$USER.txt"
+        filename = "proxies-received/#{$USER}.txt"
         update_existing_form = File.exist? filename
         File.write(filename, proxyform)
         unless update_existing_form
@@ -226,7 +226,7 @@ def emit_post(cur_mtg_dir, meeting, _)
         list = Dir['proxies-received/*.txt'].map do |file|
           form = File.read(file)
 
-          id = file[/([-A-Za-z0-9]+)\.\w+$/, 1]
+          id = File.basename(file, '.txt') # assume filename is a valid id
           proxy = form[/hereby authorize ([\S].*) to act/, 1].
             gsub('_', ' ').strip
           # Ensure availid is not included in proxy name here

Reply via email to