You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by cu...@apache.org on 2020/01/31 20:40:30 UTC

[whimsy] branch master updated: Untaint files

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

curcuru 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 6a8f973  Untaint files
6a8f973 is described below

commit 6a8f973627d6578a696ed9d75ca751d4a0453ec6
Author: Shane Curcuru <as...@shanecurcuru.org>
AuthorDate: Fri Jan 31 15:40:16 2020 -0500

    Untaint files
---
 www/members/nominations.cgi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
index 5e01958..0db3144 100755
--- a/www/members/nominations.cgi
+++ b/www/members/nominations.cgi
@@ -24,7 +24,7 @@ def setup_data(cur_mtg_dir)
   emails = []
   archive.each do |email|
     next if email.end_with? '/index'
-    message = IO.read(email, mode: 'rb')
+    message = IO.read(email.untaint, mode: 'rb')
     next unless message[/^Date: .*/].to_s.include? year
     subject = message[/^Subject: .*/]
     next if not subject # HACK: allow script to continue if bogus email
@@ -36,7 +36,7 @@ def setup_data(cur_mtg_dir)
   end
 
   # parse nominations for names and ids
-  nominations = IO.read(File.join(cur_mtg_dir, 'nominated-members.txt')).
+  nominations = IO.read(File.join(cur_mtg_dir, 'nominated-members.txt').untaint).
     scan(/^---+--\s+(.*?)\n/).flatten
 
   nominations.shift if nominations.first == '<empty line>'