mirror of
https://github.com/pi-hole/web.git
synced 2026-04-27 20:24:10 +01:00
Merge pull request #597 from pi-hole/fix/whitelist-no-password
Fix whitelisting when no password is set
This commit is contained in:
@@ -131,7 +131,7 @@ function check_domain() {
|
||||
}
|
||||
|
||||
function list_verify($type) {
|
||||
global $pwhash, $wrongpassword;
|
||||
global $pwhash, $wrongpassword, $auth;
|
||||
if(!isset($_POST['domain']) || !isset($_POST['list']) || !(isset($_POST['pw']) || isset($_POST['token']))) {
|
||||
log_and_die("Missing POST variables");
|
||||
}
|
||||
@@ -144,11 +144,7 @@ function list_verify($type) {
|
||||
elseif(isset($_POST['pw']))
|
||||
{
|
||||
require("password.php");
|
||||
if(strlen($pwhash) == 0)
|
||||
{
|
||||
log_and_die("No password set - ".htmlspecialchars($type)."listing without password not supported");
|
||||
}
|
||||
elseif($wrongpassword)
|
||||
if($wrongpassword || !$auth)
|
||||
{
|
||||
log_and_die("Wrong password - ".htmlspecialchars($type)."listing of ${_POST['domain']} not permitted");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user