diff options
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/static.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/static.rb b/actionpack/lib/action_dispatch/middleware/static.rb index 531edb27ba..31185fec07 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -38,7 +38,7 @@ module ActionDispatch end def escape_glob_chars(path) - path.gsub(/(\*|\?|\[|\]|\{|\})/, "\\\\\\1") + path.gsub(/[*?{}\[\]]/, "\\\\\\&") end end |