From bcd5040b11b8e5e7be8a1d126def2f4630eeb5ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98rjan=20Blom?= Date: Tue, 12 Feb 2013 17:21:56 +0100 Subject: [PATCH] Adjust some regular expressions * Match beginning of string instead of beginning of line. * Escape literal periods. --- app/controllers/user_open_ids_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/user_open_ids_controller.rb b/app/controllers/user_open_ids_controller.rb index dce4933c0b6..827c0048d68 100644 --- a/app/controllers/user_open_ids_controller.rb +++ b/app/controllers/user_open_ids_controller.rb @@ -80,8 +80,8 @@ class UserOpenIdsController < ApplicationController data.merge!(info) end - trusted = open_id_response.endpoint.server_url =~ /^https:\/\/www.google.com\// || - open_id_response.endpoint.server_url =~ /^https:\/\/me.yahoo.com\// + trusted = open_id_response.endpoint.server_url =~ /\Ahttps:\/\/www\.google\.com\// || + open_id_response.endpoint.server_url =~ /\Ahttps:\/\/me\.yahoo\.com\// email = data[:email] user_open_id = UserOpenId.where(url: open_id_response.display_identifier).first