Compute double hashes to avoid rainbow table vulnerability

This commit is contained in:
DL6ER
2016-11-16 22:12:52 +01:00
parent 06df8f08a2
commit 6d5c90139b
+2 -2
View File
@@ -4,8 +4,8 @@
// Test if password is set
if(strlen($pwhash) > 0)
{
// Password set
if(hash('sha256',$_POST["pw"]) == $pwhash || $_GET["auth"] == $pwhash)
// Password set compare with double hash
if(hash('sha256',hash('sha256',$_POST["pw"])) == $pwhash || $_GET["auth"] == $pwhash)
{
// Password (POST) correct or hash (GET) correct
$auth = true;