Jump to content

Security Test


Recommended Posts

Well, I know storing the password text-wise is bad, but right now, I've got no other way of doing it (want to keep it file-based). Is there a way of just storing the md5?

 

<?php
$passwordFromLogin = $_POST['passwrd'];
$passwordEncrypted = md5($passwordFromLogin);

$passwordText = "text_form_of_password_saved_here";
$encryptedPass = md5($passwordText);

if ($passwordEncrypted == $encryptedPass)
{
	echo '<script type="text/javascript">';
	echo 'window.location = "http://flyingisfun1217.freeweb7.com/gallery/mySpecialPage.php"';
	echo '</script>';
}
else
{
	echo '<script type="text/javascript">';
	echo 'window.location = "http://flyingisfun1217.freeweb7.com/gallery/error.php"';
	echo '</script>';
}
?>

 

Thanks!

FlyingIsFun1217

Link to comment
Share on other sites

Actually, I'm using a stored MD5 hash (in a cookie) check against that of the site password. Might think about sessions later, but for now, I'll focus on getting my cookie check to work, and make sure my thumbnail (picture gallery I'm 'creating') generation works right.

 

Thanks again for your help, and sorry for being hasty in the one post ;)

 

FlyingIsFun1217

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.