mirror of
https://github.com/redmine/redmine.git
synced 2026-05-09 00:37:29 +02:00
Strip whitespace from login on login page (#22532).
Patch by Artur Borisovich and Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17113 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -220,6 +220,15 @@ class AccountControllerTest < Redmine::ControllerTest
|
||||
assert_response 302
|
||||
end
|
||||
|
||||
def test_login_should_strip_whitespaces_from_user_name
|
||||
post :login, :params => {
|
||||
:username => ' jsmith ',
|
||||
:password => 'jsmith'
|
||||
}
|
||||
assert_response 302
|
||||
assert_equal 2, @request.session[:user_id]
|
||||
end
|
||||
|
||||
def test_get_logout_should_not_logout
|
||||
@request.session[:user_id] = 2
|
||||
get :logout
|
||||
|
||||
Reference in New Issue
Block a user