From 7be5fd8eeaf60d15a08659f11d4450a497f27db9 Mon Sep 17 00:00:00 2001
From: hahn <axel.hahn@iml.unibe.ch>
Date: Tue, 9 Aug 2022 10:32:02 +0200
Subject: [PATCH] fix 5559: check json in extravar

---
 public_html/deployment/plugins/rollout/awx/rollout_awx.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/public_html/deployment/plugins/rollout/awx/rollout_awx.php b/public_html/deployment/plugins/rollout/awx/rollout_awx.php
index 7ffed5c5..41919f55 100644
--- a/public_html/deployment/plugins/rollout/awx/rollout_awx.php
+++ b/public_html/deployment/plugins/rollout/awx/rollout_awx.php
@@ -177,7 +177,7 @@ class rollout_awx extends rollout_base {
         // ----- Checks:
         $sCmdChecks='';
         if($aConfig['extravars']){
-            $aTmp=json_decode($aConfig['extravars']);
+            $aTmp=json_decode($aConfig['extravars'], 1);
             if (!$aTmp || !is_array($aTmp) || !count($aTmp) ){
                 $sCmdChecks.='echo "ERROR: Value in extravars has wrong Syntax - this is no JSON: '.$aConfig['extravars'].'"; exit 1; ';                
             }
-- 
GitLab