Skip navigation.
Home

archives

Why check one password when you can check them all...

DB Hoopla

Of all the WTF submissions I've gotten, this is one that I actually wanted to confirm. I didn't think anybody, no matter how beginner would pull something like this:

<?php
$query
= "SELECT * FROM passwords";
$mysql_result = mysql_query($query, $mysql_link);
while(
$row = mysql_fetch_array($mysql_result)) {
   if (
$row[0] == $passwd){
                 print(
"ok");
                 return
0;
   }
}
?>

Short and not so sweet. Thanks to Piotr Budny for sending this in. Somebody complained that his web sites wasn't working so Piotr dug into it and found today's WTF! Yikes!