diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index b1198b346..d454abaf4 100755 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -3922,6 +3922,16 @@ sub defls # the object names are passed in through command line if ($::objectsfrom_args || $::opt_o || (($type eq 'node') && ($::opt_o || @::noderange))) { + + eval { /$obj/ }; + if ($@) + { + my $rsp = {}; + $rsp->{data}->[0] = "Invalid \'$obj\' name, check the object named \'$obj\' of type \'$type\' syntax."; + xCAT::MsgUtils->message("E", $rsp, $::callback); + next; + } + if (!grep(/^$obj$/, @allobjoftype)) { my $rsp;