whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Unnecessary untaint
Date Sun, 04 Oct 2020 11:24:31 GMT
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 fd5d2c3  Unnecessary untaint
fd5d2c3 is described below

commit fd5d2c354f40dfcab6e77f51e6abd8b42984e88f
Author: Sebb <sebb@apache.org>
AuthorDate: Sun Oct 4 12:24:23 2020 +0100

    Unnecessary untaint
---
 www/secretary/workbench/models/attachment.rb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/www/secretary/workbench/models/attachment.rb b/www/secretary/workbench/models/attachment.rb
index cb9055a..fc0382d 100644
--- a/www/secretary/workbench/models/attachment.rb
+++ b/www/secretary/workbench/models/attachment.rb
@@ -64,7 +64,6 @@ class Attachment
   def as_pdf
     ext = File.extname(name).downcase
     ext = '.pdf' if content_type.end_with? '/pdf'
-    ext.untaint if ext =~ /^\.\w+$/
 
     file = SafeTempFile.new([safe_name, ext])
     file.write(body) # SafeTempFile forces encoding: BINARY


Mime
View raw message