From edc61487a40c5c64dff645f486a6c94314ab2ab1 Mon Sep 17 00:00:00 2001 From: XuWei Date: Wed, 13 Dec 2017 20:33:06 -0500 Subject: [PATCH] Fix issue 4507, add parameter check for rspconfig admin_passwd --- xCAT-server/lib/xcat/plugins/openbmc.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index f684bfab3..dd7a80b5d 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -993,6 +993,9 @@ sub parse_args { if ($key eq "admin_passwd") { my $comma_num = $value =~ tr/,/,/; return ([ 1, "Invalid parameter for option $key: $value" ]) if ($comma_num != 1); + if ($subcommand =~ /^admin_passwd=(.*),(.*)/) { + return ([ 1, "Invalid parameter for option $key: $value" ]) if ($1 eq "" or $2 eq ""); + } } my $nodes_num = @$noderange;