X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/dc2a2c8ebd1a11e4a64555fda22c6859a51defff..8e404f3a468a2636481d52f245b816c41e9d5ac0:/app/controllers/user_controller.rb diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 1a7f3810a..6cb0b60db 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -89,7 +89,7 @@ class UserController < ApplicationController begin uri = URI(session[:referer]) - /map=(.*)\/(.*)\/(.*)/.match(uri.fragment) do |m| + %r{map=(.*)/(.*)/(.*)}.match(uri.fragment) do |m| editor = Rack::Utils.parse_query(uri.query).slice("editor") referer = welcome_path({ "zoom" => m[1], "lat" => m[2], @@ -625,8 +625,8 @@ class UserController < ApplicationController # check if we trust an OpenID provider to return a verified # email, so that we can skpi verifying it ourselves def openid_email_verified(openid_url) - openid_url.match(/https:\/\/www.google.com\/accounts\/o8\/id?(.*)/) || - openid_url.match(/https:\/\/me.yahoo.com\/(.*)/) + openid_url.match(%r{https://www.google.com/accounts/o8/id?(.*)}) || + openid_url.match(%r{https://me.yahoo.com/(.*)}) end ##