diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2022-05-11 20:09:16 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2022-05-11 20:09:16 +0000 |
commit | 1d02d8ec0be539c0387121fdc1634518abf5e99e (patch) | |
tree | 7e60344de8e6ef991972a6e5d742819f4c798ad8 /test/functional | |
parent | 5e1e8684fcf4e90def0c0965c47017f80fdef4b3 (diff) | |
download | redmine-1d02d8ec0be539c0387121fdc1634518abf5e99e.tar.gz redmine-1d02d8ec0be539c0387121fdc1634518abf5e99e.zip |
Don't verify CSRF authenticity token in mail handler (#37030).
Patch by Go MAEDA.
git-svn-id: https://svn.redmine.org/redmine/trunk@21568 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/mail_handler_controller_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/mail_handler_controller_test.rb b/test/functional/mail_handler_controller_test.rb index 75f6fbef3..b77070d1d 100644 --- a/test/functional/mail_handler_controller_test.rb +++ b/test/functional/mail_handler_controller_test.rb @@ -170,4 +170,11 @@ class MailHandlerControllerTest < Redmine::ControllerTest end assert_response :success end + + def test_should_skip_verify_authenticity_token + ActionController::Base.allow_forgery_protection = true + assert_nothing_raised {test_should_create_issue} + ensure + ActionController::Base.allow_forgery_protection = false + end end |