Merge branch 'devel' into restructureFolders

This commit is contained in:
Mcat12
2016-12-30 14:44:26 -05:00
3 changed files with 37 additions and 14 deletions

View File

@@ -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();
}
?>