mirror of
https://github.com/redmine/redmine.git
synced 2026-03-08 05:30:45 +01:00
Merged r21568 to 5.0-stable (#37030).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21572 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -22,6 +22,9 @@ class MailHandlerController < ActionController::Base
|
||||
|
||||
before_action :check_credential
|
||||
|
||||
# Requests from rdm-mailhandler.rb don't contain CSRF tokens
|
||||
skip_before_action :verify_authenticity_token
|
||||
|
||||
# Displays the email submission form
|
||||
def new
|
||||
end
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user