mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Compute double hashes to avoid rainbow table vulnerability
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user