diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-03-15 10:14:13 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-03-15 10:14:13 -0700 |
commit | f9181377924a77dff328c49f51b6dc66c4705e2b (patch) | |
tree | 01cb0affd57393b9654073dd35dce3ad544c0eda /actionpack/lib/action_dispatch/middleware/static.rb | |
parent | 9dfb41fd2e90398cf96db5f33105be26a09cb92c (diff) | |
parent | 55cac81bc50b7b825e12e1c42edda398094d67ef (diff) | |
download | rails-f9181377924a77dff328c49f51b6dc66c4705e2b.tar.gz rails-f9181377924a77dff328c49f51b6dc66c4705e2b.tar.bz2 rails-f9181377924a77dff328c49f51b6dc66c4705e2b.zip |
Merge pull request #5338 from mreinsch/3-2-static_invalid_byte_sequence
3 2 static invalid byte sequence
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/static.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/static.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/static.rb b/actionpack/lib/action_dispatch/middleware/static.rb index 31185fec07..ad11b6a211 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -38,6 +38,7 @@ module ActionDispatch end def escape_glob_chars(path) + path.force_encoding('binary') if path.respond_to? :force_encoding path.gsub(/[*?{}\[\]]/, "\\\\\\&") end end |