Skip to content

Commit

Permalink
case insensitive extension check
Browse files Browse the repository at this point in the history
  • Loading branch information
benbalter committed Jan 10, 2015
1 parent 3dbb423 commit a44d29f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def html_escape(text)
end

post "/" do
unless params['doc'][:filename].match /docx?$/
unless params['doc'][:filename].match /docx?$/i
error = "It looks like you tried to upload something other than a Word Document."
render_template :index, { :error => error }
end
Expand Down

0 comments on commit a44d29f

Please sign in to comment.