mirror of
https://github.com/pi-hole/web.git
synced 2026-04-24 10:50:23 +01:00
Merge branch 'devel' into restructureFolders
This commit is contained in:
@@ -105,4 +105,33 @@ function check_domain() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function list_verify($type) {
|
||||
if(!isset($_POST['domain']) || !isset($_POST['list']) || !(isset($_POST['pw']) || isset($_POST['token']))) {
|
||||
log_and_die("Missing POST variables");
|
||||
}
|
||||
|
||||
if(isset($_POST['token']))
|
||||
{
|
||||
check_cors();
|
||||
check_csrf($_POST['token']);
|
||||
}
|
||||
elseif(isset($_POST['pw']))
|
||||
{
|
||||
require("password.php");
|
||||
if(strlen($pwhash) == 0)
|
||||
{
|
||||
log_and_die("No password set - ${type}listing with password not supported");
|
||||
}
|
||||
elseif($wrongpassword)
|
||||
{
|
||||
log_and_die("Wrong password - ${type}listing of ${_POST['domain']} not permitted");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
log_and_die("Not allowed!");
|
||||
}
|
||||
check_domain();
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user