]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/IS.pm
Paranoiasicherheitscheck in IR.pm
[kivitendo-erp.git] / SL / IS.pm
index 6b9018d95aaa68f39d0d5dbe326836b3d3acb2fe..1ee47f20990f363c61a7bb3c86448697abfe895e 100644 (file)
--- a/SL/IS.pm
+++ b/SL/IS.pm
@@ -2230,6 +2230,10 @@ sub has_storno {
 
   $main::lxdebug->leave_sub() and return 0 unless ($form->{id});
 
+  # make sure there's no funny stuff in $table
+  # ToDO: die when this happens and throw an error
+  $main::lxdebug->leave_sub() and return 0 if ($table =~ /\W/);
+
   my $dbh = $form->dbconnect($myconfig);
 
   my $query = qq|SELECT storno FROM $table WHERE id = ?|;