add rack-utf8_sanitizer gem

This commit is contained in:
Alexander Machehin 2015-03-25 17:34:56 +05:00
parent b1fb82834e
commit 366e17b75d
3 changed files with 7 additions and 0 deletions

View File

@ -102,6 +102,8 @@ source 'https://rails-assets.org' do
gem 'rails-assets-notifyjs' gem 'rails-assets-notifyjs'
end end
gem 'rack-utf8_sanitizer'
group :production do group :production do
gem 'airbrake' gem 'airbrake'
#gem 'bluepill', '~> 0.0.60', require: false #gem 'bluepill', '~> 0.0.60', require: false

View File

@ -361,6 +361,8 @@ GEM
rack (>= 1.0) rack (>= 1.0)
rack-throttle (0.3.0) rack-throttle (0.3.0)
rack (>= 1.0.0) rack (>= 1.0.0)
rack-utf8_sanitizer (1.3.0)
rack (~> 1.0)
rails (4.1.9) rails (4.1.9)
actionmailer (= 4.1.9) actionmailer (= 4.1.9)
actionpack (= 4.1.9) actionpack (= 4.1.9)
@ -636,6 +638,7 @@ DEPENDENCIES
protected_attributes protected_attributes
puma puma
rack-throttle (~> 0.3.0) rack-throttle (~> 0.3.0)
rack-utf8_sanitizer
rails (= 4.1.9) rails (= 4.1.9)
rails-assets-notifyjs! rails-assets-notifyjs!
rails3-generators rails3-generators

View File

@ -21,6 +21,8 @@ module Rosa
# Rate limit # Rate limit
config.middleware.insert_before Rack::Runtime, ApiDefender config.middleware.insert_before Rack::Runtime, ApiDefender
# Rack::UTF8Sanitizer is a Rack middleware which cleans up invalid UTF8 characters in request URI and headers.
config.middleware.insert 0, Rack::UTF8Sanitizer
config.autoload_paths += %W(#{config.root}/lib) config.autoload_paths += %W(#{config.root}/lib)