mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Added a test that shows that a HEAD request does not normally pass CSRF protection
This commit is contained in:
parent
5f412956cf
commit
64245e02e3
1 changed files with 4 additions and 0 deletions
|
@ -170,6 +170,10 @@ module RequestForgeryProtectionTests
|
|||
assert_not_blocked { get :index }
|
||||
end
|
||||
|
||||
def test_should_allow_head
|
||||
assert_not_blocked { head :index }
|
||||
end
|
||||
|
||||
def test_should_allow_post_without_token_on_unsafe_action
|
||||
assert_not_blocked { post :unsafe }
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue