diff options
Diffstat (limited to 'app/controllers/concerns/internal_redirect.rb')
-rw-r--r-- | app/controllers/concerns/internal_redirect.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/concerns/internal_redirect.rb b/app/controllers/concerns/internal_redirect.rb index b803be67d2e..c3aa487c805 100644 --- a/app/controllers/concerns/internal_redirect.rb +++ b/app/controllers/concerns/internal_redirect.rb @@ -6,7 +6,7 @@ module InternalRedirect def safe_redirect_path(path) return unless path # Verify that the string starts with a `/` and a known route character. - return unless path =~ %r{\A/[-\w].*\z} + return unless %r{\A/[-\w].*\z}.match?(path) uri = URI(path) # Ignore anything path of the redirect except for the path, querystring and, |