From 51b6e37dcd582aed9416c93360d7137706646633 Mon Sep 17 00:00:00 2001 From: dmaiocchi Date: Tue, 16 Feb 2021 15:41:51 +0100 Subject: [PATCH] Use safe_x --- hawk/app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hawk/app/controllers/application_controller.rb b/hawk/app/controllers/application_controller.rb index 8b63df645..b4bce8fb4 100644 --- a/hawk/app/controllers/application_controller.rb +++ b/hawk/app/controllers/application_controller.rb @@ -190,7 +190,7 @@ def login_from_cookie user = cookies['hawk_remember_me_id'] return if user.nil? # read from attrd - values, _, _ = Util.capture3("/usr/sbin/attrd_updater", "-R", "-Q","-A", "-n", "hawk_session_#{user}").scan(/value=\"(.*)\"/).flatten(1) + values = Util.safe_x("/usr/sbin/attrd_updater", "-R", "-Q", "-A", "-n", "hawk_session_#{user}").scan(/value=\"(.*)\"/).flatten(1) user if values.include? cookies['hawk_remember_me_key'] end