mirror of
https://github.com/redmine/redmine.git
synced 2026-03-23 12:51:02 +01:00
Merged r12311 (#15427).
git-svn-id: http://svn.redmine.org/redmine/branches/2.4-stable@12312 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -33,13 +33,19 @@ class ApplicationController < ActionController::Base
|
||||
layout 'base'
|
||||
|
||||
protect_from_forgery
|
||||
def handle_unverified_request
|
||||
super
|
||||
cookies.delete(autologin_cookie_name)
|
||||
if api_request?
|
||||
logger.error "API calls must include a proper Content-type header (application/xml or application/json)."
|
||||
|
||||
def verify_authenticity_token
|
||||
unless api_request?
|
||||
super
|
||||
end
|
||||
end
|
||||
|
||||
def handle_unverified_request
|
||||
unless api_request?
|
||||
super
|
||||
cookies.delete(autologin_cookie_name)
|
||||
render_error :status => 422, :message => "Invalid form authenticity token."
|
||||
end
|
||||
render_error :status => 422, :message => "Invalid form authenticity token."
|
||||
end
|
||||
|
||||
before_filter :session_expiration, :user_setup, :check_if_login_required, :check_password_change, :set_localization
|
||||
|
||||
Reference in New Issue
Block a user