From be4ad600589c7b5516adbe33ddfac09a8ec98fcc 2012-06-10 13:23:01 From: Jean-Philippe Lang Date: 2012-06-10 13:23:01 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 --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e4d5fb5..17968bf 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