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:
Jean-Philippe Lang 2012-06-10 13:23:01 +00:00
parent 74645eb017
commit be4ad60058
1 changed files with 2 additions and 2 deletions

View File

@ -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