Taint Mode in Perl: Unterschied zwischen den Versionen

Aus Markus' Wiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „Good Links: * http://gunther.web66.com/FAQS/taintmode.html * http://stackoverflow.com/questions/2228457/is-perls-taint-mode-useful * http://www.linux-praxis.d…“)
 
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 1: Zeile 1:
 +
Code Injection:
 +
 +
#!/usr/bin/perl
 +
my $name = $cgi->param("name");  # Get the name from the browser
 +
...
 +
$dbh->TaintIn = 1;
 +
$dbh->execute("SELECT * FROM users WHERE name = '$name';"); # Execute a SQL query
 +
 
Good Links:
 
Good Links:
  
Zeile 5: Zeile 13:
 
* http://www.linux-praxis.de/lpic2/lpi201/perl3.html
 
* http://www.linux-praxis.de/lpic2/lpi201/perl3.html
 
* http://en.wikipedia.org/wiki/Taint_checking
 
* http://en.wikipedia.org/wiki/Taint_checking
 +
 +
Similar Problems in PHP:
 +
* http://www.codehelp.co.uk/php/taint.php

Aktuelle Version vom 9. Juli 2012, 08:16 Uhr

Code Injection:

#!/usr/bin/perl
my $name = $cgi->param("name");  # Get the name from the browser
...
$dbh->TaintIn = 1;
$dbh->execute("SELECT * FROM users WHERE name = '$name';"); # Execute a SQL query

Good Links:

Similar Problems in PHP: