whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: force extensions to be lowercase
Date Tue, 04 Oct 2016 11:45:24 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://git-dual.apache.org/repos/asf/whimsy.git

The following commit(s) were added to refs/heads/master by this push:
       new  2324ebe   force extensions to be lowercase
2324ebe is described below

commit 2324ebedb664f8ef9f935f1db98dc14fac901fc3
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Tue Oct 4 07:44:48 2016 -0400

    force extensions to be lowercase
---
 www/secmail/views/actions/ccla.json.rb  | 2 +-
 www/secmail/views/actions/grant.json.rb | 2 +-
 www/secmail/views/actions/icla.json.rb  | 2 +-
 www/secmail/views/parts.js.rb           | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/www/secmail/views/actions/ccla.json.rb b/www/secmail/views/actions/ccla.json.rb
index c22c68d..4f69339 100644
--- a/www/secmail/views/actions/ccla.json.rb
+++ b/www/secmail/views/actions/ccla.json.rb
@@ -9,7 +9,7 @@
 message = Mailbox.find(@message)
 
 # extract file extension
-fileext = File.extname(@selected) if @signature.empty?
+fileext = File.extname(@selected).downcase if @signature.empty?
 
 # verify that a CCLA under that name doesn't already exist
 if "#@filename#{fileext}" =~ /\w[-\w]*\.?\w*/
diff --git a/www/secmail/views/actions/grant.json.rb b/www/secmail/views/actions/grant.json.rb
index 8763d5d..9c273aa 100644
--- a/www/secmail/views/actions/grant.json.rb
+++ b/www/secmail/views/actions/grant.json.rb
@@ -9,7 +9,7 @@
 message = Mailbox.find(@message)
 
 # extract file extension
-fileext = File.extname(@selected) if @signature.empty?
+fileext = File.extname(@selected).downcase if @signature.empty?
 
 # verify that a grant under that name doesn't already exist
 if "#@filename#{fileext}" =~ /\w[-\w]*\.?\w*/
diff --git a/www/secmail/views/actions/icla.json.rb b/www/secmail/views/actions/icla.json.rb
index 0bf5cb5..df6b52f 100644
--- a/www/secmail/views/actions/icla.json.rb
+++ b/www/secmail/views/actions/icla.json.rb
@@ -11,7 +11,7 @@
 message = Mailbox.find(@message)
 
 # extract file extension
-fileext = File.extname(@selected) if @signature.empty?
+fileext = File.extname(@selected).downcase if @signature.empty?
 
 # verify that an ICLA under that name doesn't already exist
 if "#@filename#{fileext}" =~ /\w[-\w]*\.?\w*/
diff --git a/www/secmail/views/parts.js.rb b/www/secmail/views/parts.js.rb
index b679241..0ea3835 100644
--- a/www/secmail/views/parts.js.rb
+++ b/www/secmail/views/parts.js.rb
@@ -46,7 +46,7 @@ class Parts < React
         options[:className] = nil
       end
 
-      if attachment =~ /\.(pdf|txt|jpeg|jpg|gif|png)$/
+      if attachment =~ /\.(pdf|txt|jpeg|jpg|gif|png)$/i
         link = "./#{attachment}"
       else
         link = "_danger_/#{attachment}"

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message