Hi.
I'm working on a system to reset
the user password.
To making the script safer against
hacking I made this simple snippet:
<?php
function checkPath($findMe)
{
$path = basename($_SERVER['PHP_SELF']);
return strpos($path, $findMe);
}
$findMe = "PW";
if (checkPath($findMe) === false)
{// REDIRECT
echo "NO GOOD";
}
else
{
echo "GOOD";
}
print_r($_GET);
?>
I'm putting it in ie reset.php and
the page will be redirect unless
you don't set your path like this reset.php/PW.
(To working the script will have got a path like this
reset.php/PW?r=6e029fbfa817dfc458598a5d38a6755f)
What do you think about ?
Do you have any tip ?
Bye.