From 0c88742d077ab107dafcafde3ee04636e50d9c76 Mon Sep 17 00:00:00 2001 From: Egor Homakov Date: Sat, 26 Jan 2013 20:56:45 +1100 Subject: [PATCH] Stringify api_key Fixes #2492 Conflicts: api/app/controllers/spree/api/v1/base_controller.rb --- api/app/controllers/spree/api/v1/base_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/controllers/spree/api/v1/base_controller.rb b/api/app/controllers/spree/api/v1/base_controller.rb index 9a237b5b133..26625c8fa20 100644 --- a/api/app/controllers/spree/api/v1/base_controller.rb +++ b/api/app/controllers/spree/api/v1/base_controller.rb @@ -41,7 +41,7 @@ def check_for_api_key end def authenticate_user - unless @current_api_user = Spree.user_class.find_by_spree_api_key(api_key) + unless @current_api_user = Spree.user_class.find_by_spree_api_key(api_key.to_s) render "spree/api/v1/errors/invalid_api_key", :status => 401 and return end end