diff options
author | Michael Reinsch <michael@mobalean.com> | 2012-03-08 20:26:10 +0900 |
---|---|---|
committer | Michael Reinsch <michael@mobalean.com> | 2012-03-08 20:44:28 +0900 |
commit | 55cac81bc50b7b825e12e1c42edda398094d67ef (patch) | |
tree | 5b62e6995b3729dc2b5f670e7d7118a3a3058a5c /actionpack/lib/action_dispatch | |
parent | 9bcd6622dde4896b54fc0e1f843c624771e3e425 (diff) | |
download | rails-55cac81bc50b7b825e12e1c42edda398094d67ef.tar.gz rails-55cac81bc50b7b825e12e1c42edda398094d67ef.tar.bz2 rails-55cac81bc50b7b825e12e1c42edda398094d67ef.zip |
fix ArgumentError being raised in case of invalid byte sequences
Diffstat (limited to 'actionpack/lib/action_dispatch')
-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 |