Jump to content

Recommended Posts

Hey!

 

Can anybody test this site to see if you can get access to my 'special page' by using the password login (not just... going there)?

 

Right now, the main Phpfreaks.com site seems to be down, so I can't get to any tutorials to try and learn more security stuff.

 

FlyingIsFun1217

Link to comment
https://forums.phpfreaks.com/topic/102219-security-test/
Share on other sites

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
https://forums.phpfreaks.com/topic/102219-security-test/#findComment-523301
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
https://forums.phpfreaks.com/topic/102219-security-test/#findComment-523538
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.