Make sure that #api_key_from_request returns a String.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9798 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
74645eb017
commit
be4ad60058
|
@ -486,9 +486,9 @@ class ApplicationController < ActionController::Base
|
|||
# Returns the API key present in the request
|
||||
def api_key_from_request
|
||||
if params[:key].present?
|
||||
params[:key]
|
||||
params[:key].to_s
|
||||
elsif request.headers["X-Redmine-API-Key"].present?
|
||||
request.headers["X-Redmine-API-Key"]
|
||||
request.headers["X-Redmine-API-Key"].to_s
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue