Muskovitz has asked for the wisdom of the Perl Monks concerning the following question:
Every time i use this SQL query "or '1'='1 ' or 'x'='x'" I redirect to a page 403 forbidden any idea on how to get rid of this? Thanks in advance!Login - Code my $type="mysql"; my $database="database_one"; my $host="localhost"; my $port="3306"; my $user="root"; my $pwd="*****"; my $dsn="dbi:$type:$database:$host:$port"; my $connect=DBI->connect($dsn,$user,$pwd); >> HTML CODE HERE << $query=qq{SELECT * FROM login WHERE username=? AND password=?}; $queryhandle=$connect->prepare($query); my $login=$queryhandle->execute($param{username},$param{password}); if($login!=0){ ... }else{ ... } Post - Code >>HTML CODE HERE<< $query=qq{INSERT INTO feed(details,name,date)VALUES(?,?,?)}; $queryhandle=$connect->prepare($query); $queryhandle->execute("$postparam{details}","$postparam{name}","$postp +aram{date}"); $queryhandle->finish; ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SQL Injection Queries in Perl/CGI
by hardburn (Abbot) on Dec 11, 2015 at 14:35 UTC | |
by Muskovitz (Scribe) on Dec 11, 2015 at 14:42 UTC | |
by hardburn (Abbot) on Dec 11, 2015 at 14:50 UTC | |
by chacham (Prior) on Dec 11, 2015 at 15:13 UTC | |
by hardburn (Abbot) on Dec 11, 2015 at 15:48 UTC | |
|
Re: SQL Injection Queries in Perl/CGI
by chacham (Prior) on Dec 11, 2015 at 15:17 UTC | |
by Muskovitz (Scribe) on Dec 11, 2015 at 15:20 UTC |