Permalink
Browse files

Merge pull request #8482 from BanzaiMan/defensive_matching_on_default…

…_index_page

Match the controller and path names defensively.
  • Loading branch information...
2 parents 603e7f7 + c00e7aa commit 377692e9410922bc508fafb42602187728d421e7 @spastorino spastorino committed Dec 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_dispatch/routing/inspector.rb
View
2 actionpack/lib/action_dispatch/routing/inspector.rb
@@ -51,7 +51,7 @@ def action
end
def internal?
- controller =~ %r{^rails/info|^rails/welcome} || path =~ %r{^#{Rails.application.config.assets.prefix}}
+ controller =~ %r{\Arails/(info|welcome)} || path =~ %r{\A#{Rails.application.config.assets.prefix}}
end
def engine?

0 comments on commit 377692e

Please sign in to comment.