From be4ad600589c7b5516adbe33ddfac09a8ec98fcc Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 10 Jun 2012 13:23:01 +0000 Subject: [PATCH] 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 --- app/controllers/application_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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