diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e4d5fb542..17968bf79 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -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