mirror of
https://github.com/redmine/redmine.git
synced 2025-11-14 17:26:06 +01:00
Mark sensitive user forms with Cache-Control: no-store (#42998).
Patch by Holger Just (user:hjust). git-svn-id: https://svn.redmine.org/redmine/trunk@23942 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -438,6 +438,8 @@ class UsersControllerTest < Redmine::ControllerTest
|
||||
def test_new
|
||||
get :new
|
||||
assert_response :success
|
||||
assert_includes @response.headers['Cache-Control'], 'no-store'
|
||||
|
||||
assert_select 'input[name=?]', 'user[login]'
|
||||
assert_select 'label[for=?]>span.required', 'user_password', 1
|
||||
end
|
||||
@@ -554,6 +556,8 @@ class UsersControllerTest < Redmine::ControllerTest
|
||||
post :create, :params => {:user => {:login => 'foo'}}
|
||||
end
|
||||
assert_response :success
|
||||
assert_includes @response.headers['Cache-Control'], 'no-store'
|
||||
|
||||
assert_select_error /Email cannot be blank/
|
||||
end
|
||||
|
||||
@@ -640,6 +644,8 @@ class UsersControllerTest < Redmine::ControllerTest
|
||||
end
|
||||
|
||||
assert_response :success
|
||||
assert_includes @response.headers['Cache-Control'], 'no-store'
|
||||
|
||||
assert_select 'h2>a+img.gravatar'
|
||||
assert_select 'input[name=?][value=?]', 'user[login]', 'jsmith'
|
||||
assert_select 'label[for=?]>span.required', 'user_password', 0
|
||||
@@ -695,6 +701,8 @@ class UsersControllerTest < Redmine::ControllerTest
|
||||
}
|
||||
end
|
||||
assert_response :success
|
||||
assert_includes @response.headers['Cache-Control'], 'no-store'
|
||||
|
||||
assert_select_error /First name cannot be blank/
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user