diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index 1bb2901a5..b1198b346 100755 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -765,6 +765,14 @@ sub processArgs # then set noderange if (($::command ne 'mkdef') && ($a =~ m/^\//)) { + eval { /$a/ }; + if ($@) + { + my $rsp = {}; + $rsp->{data}->[0] = "Invalid regular expression $a, check the noderange syntax."; + xCAT::MsgUtils->message("E", $rsp, $::callback); + return 3; + } @::noderange = &noderange($a, 1); # Use the "verify" option to support regular expression } else