From 7567c3d8b21fe67e5f04e6839c1fce061600f2f3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 29 Mar 2014 14:32:47 +0000 Subject: Fixed back url verification (#16466). git-svn-id: http://svn.redmine.org/redmine/trunk@13018 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/account_controller_test.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test/functional/account_controller_test.rb') diff --git a/test/functional/account_controller_test.rb b/test/functional/account_controller_test.rb index 35074bd4e..e9156957c 100644 --- a/test/functional/account_controller_test.rb +++ b/test/functional/account_controller_test.rb @@ -66,8 +66,14 @@ class AccountControllerTest < ActionController::TestCase end def test_login_should_not_redirect_to_another_host - post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http://test.foo/fake' - assert_redirected_to '/my/page' + back_urls = [ + 'http://test.foo/fake', + '//test.foo/fake' + ] + back_urls.each do |back_url| + post :login, :username => 'jsmith', :password => 'jsmith', :back_url => back_url + assert_redirected_to '/my/page' + end end def test_login_with_wrong_password -- cgit v1.2.3