Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re3: Using-T and Untainting SQL

by PotPieMan (Hermit)
on Apr 29, 2002 at 18:55 UTC ( [id://162898]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $username = $query->('username');
    # Do some input validation if necessary
    
    ...
    my $sql = "SELECT * FROM users WHERE username = ?";
    ...
    $sth->execute($username);
    
  2. or download this
    SELECT * FROM users WHERE username = 'PotPieMan; DROP TABLE users';

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://162898]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (4)
As of 2024-04-25 17:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found