H
howa
I have just found a simple cases, which is not, e.g.
#--------------------------------------------------
use strict;
use DBI;
use Data:umper;
my $dbh = DBI-
my $input = "%a"; # User hack by using wildcard
my $sth = $dbh->prepare("SELECT * FROM `CHARACTER_SETS` WHERE
`CHARACTER_SET_NAME` LIKE ? ") ;
$sth->execute( $input . "%") ; # Originally you let the user search by
prefix
while ( my $data = $sth->fetchrow_hashref() ) {
print Dumper $data;
}
#--------------------------------------------------
So we should not 100% believe in prepare() which make you100% SQL
injection free.
Any other cases want to share?
Howard
#--------------------------------------------------
use strict;
use DBI;
use Data:umper;
my $dbh = DBI-
{ RaiseError => 1, AutoCommit => 1 });connect("DBI:mysql:database=information_schema;host=localhost","root","",
my $input = "%a"; # User hack by using wildcard
my $sth = $dbh->prepare("SELECT * FROM `CHARACTER_SETS` WHERE
`CHARACTER_SET_NAME` LIKE ? ") ;
$sth->execute( $input . "%") ; # Originally you let the user search by
prefix
while ( my $data = $sth->fetchrow_hashref() ) {
print Dumper $data;
}
#--------------------------------------------------
So we should not 100% believe in prepare() which make you100% SQL
injection free.
Any other cases want to share?
Howard