From 8832ce18e4a3c88a6965f4cbdcd23e799979a40a Mon Sep 17 00:00:00 2001 From: kjgarza Date: Fri, 27 Mar 2020 18:12:10 +0100 Subject: [PATCH] hanlde empty --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 35ecfe299..91ee69fb4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -73,7 +73,7 @@ def authenticate_user_with_basic_auth! def authenticate_user! type, credentials = type_and_credentials_from_request_headers return false if credentials.blank? - raise JWT::VerificationError if ENV["JWT_BLACKLISTED"].split(",").include?(credentials) + raise JWT::VerificationError if (ENV["JWT_BLACKLISTED"] || "").split(",").include?(credentials) @current_user = User.new(credentials, type: type) fail CanCan::AuthorizationNotPerformed if @current_user.errors.present?