in reply to DBI Parameter Security
The extra quotes would prevent the baz from getting out unless something was passed which was like $baz = "foo'; DROP TABLE blah; SELECT * FROM foo WHERE a = 'B"## Badd my $sth = $dbh->prepare('SELECT * FROM foo WHERE bar = ?'); $sth->execute($baz) ## Good my $sth = $dbh->prepare("SELECT * FROM foo WHERE bar = '?'"); $sth->execute($baz)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: DBI Parameter Security
by chipmunk (Parson) on Jul 14, 2001 at 00:03 UTC | |
|
Re: Re: DBI Parameter Security
by MZSanford (Curate) on Jul 13, 2001 at 21:33 UTC |