Found at: http://publish.ez.no/article/articleprint/69/ |
Security flaws in PHP |
When developing web applications in PHP (or any other languages for that matter) there are several security aspects we should consider. In this article I'll try to explain some of the most common security flaws, and show simple ways to secure your site.
<?php <!-- print header here --> include( $page ); <!-- print footer here --> ?> |
<?php passthru( "cat /etc/passwd" ); ?> |
<?php
if ( !is_numeric( $id ) )
{
print( "Error in syntax" );
die();
}
....
?> |
<form action="login.php" method="post"> User name: <input type="text" name="Username"/> Password: <input type="password" name="Password"/> <input type="submit" value="OK" /> </form> |