diff --git a/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm b/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm index 8d86fa5ca..b9eddf7bc 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/tabutils.pm @@ -593,6 +593,10 @@ sub nodech { ($table, $column) = split('\.', $temp, 2); } + unless (grep /$column/,@{$xCAT::Schema::tabspec{$table}->{cols}}) { + $callback->({error=>"$table.$column not a valid table.column description",errorcode=>[1]}); + return; + } $tables{$table}->{$column} = [$value, $op]; } foreach $tab (keys %tables) @@ -795,6 +799,10 @@ sub nodels { ($table, $column) = split('\.', $temp, 2); } + unless (grep /$column/,@{$xCAT::Schema::tabspec{$table}->{cols}}) { + $callback->({error=>"$table.$column not a valid table.column description",errorcode=>[1]}); + next; + } unless (grep /^$column$/, @{$tables{$table}}) { push @{$tables{$table}},