Verbesserte Regex für API-Aufruf. Gorash Code-QS. Abfangen von
SQL-Injections auf API-Ebene (100%)
my ($self, $table, $option) = @_;
return unless $self->{id};
- croak ("wrong call, no valid table defined") unless $table =~ /(oe|ar|ap|delivery_orders|parts)/;
+ croak ("wrong call, no valid table defined") unless $table =~ /^(oe|ar|ap|delivery_orders|parts)$/;
my $query = "SELECT mtime, itime FROM " . $table . " WHERE id = ?";
my $ref = selectfirst_hashref_query($self, $self->get_standard_dbh, $query, $self->{id});