Skip to content
Snippets Groups Projects
Commit 7be5fd8e authored by hahn's avatar hahn
Browse files

fix 5559: check json in extravar

parent 3f9c223f
No related branches found
No related tags found
1 merge request!195534 add docker
...@@ -177,7 +177,7 @@ class rollout_awx extends rollout_base { ...@@ -177,7 +177,7 @@ class rollout_awx extends rollout_base {
// ----- Checks: // ----- Checks:
$sCmdChecks=''; $sCmdChecks='';
if($aConfig['extravars']){ if($aConfig['extravars']){
$aTmp=json_decode($aConfig['extravars']); $aTmp=json_decode($aConfig['extravars'], 1);
if (!$aTmp || !is_array($aTmp) || !count($aTmp) ){ if (!$aTmp || !is_array($aTmp) || !count($aTmp) ){
$sCmdChecks.='echo "ERROR: Value in extravars has wrong Syntax - this is no JSON: '.$aConfig['extravars'].'"; exit 1; '; $sCmdChecks.='echo "ERROR: Value in extravars has wrong Syntax - this is no JSON: '.$aConfig['extravars'].'"; exit 1; ';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment