Merge branch 'devel' into new/longterm/select_query_type

This commit is contained in:
DL6ER
2018-08-29 20:35:47 +02:00
4 changed files with 28 additions and 7 deletions

View File

@@ -315,7 +315,7 @@ $(document).ready(function() {
});
$("#all-queries tbody").on( "click", "button", function () {
var data = tableApi.row( $(this).parents("tr") ).data();
if (data[4] === "1")
if (data[4] === 1 || data[4] === 4 || data[5] === 5)
{
add(data[2],"white");
}

View File

@@ -352,7 +352,7 @@ $(document).ready(function() {
$("#all-queries tbody").on( "click", "button", function () {
var data = tableApi.row( $(this).parents("tr") ).data();
if (data[4] === "1" || data[4] === "5")
if (data[4] === "1" || data[4] === "4" || data[4] === "5")
{
add(data[2],"white");
}

View File

@@ -93,8 +93,16 @@ function check_csrf($token) {
session_start();
}
if(!isset($_SESSION['token']) || empty($token) || !hash_equals($_SESSION['token'], $token)) {
log_and_die("Wrong token");
if(!isset($_SESSION['token'])) {
log_and_die("Session expired! Please re-login on the Pi-hole dashboard.");
}
if(empty($token)) {
log_and_die("Empty token! Check if cookies are enabled on your system.");
}
if(!hash_equals($_SESSION['token'], $token)) {
log_and_die("Wrong token! Please re-login on the Pi-hole dashboard.");
}
}

View File

@@ -309,9 +309,22 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "blocklists"
$DHCP = false;
}
// Read setings from config file
$DHCPstart = $setupVars["DHCP_START"];
$DHCPend = $setupVars["DHCP_END"];
$DHCProuter = $setupVars["DHCP_ROUTER"];
if (isset($setupVars["DHCP_START"])) {
$DHCPstart = $setupVars["DHCP_START"];
} else {
$DHCPstart = "";
}
if (isset($setupVars["DHCP_END"])) {
$DHCPend = $setupVars["DHCP_END"];
} else {
$DHCPend = "";
}
if (isset($setupVars["DHCP_ROUTER"])) {
$DHCProuter = $setupVars["DHCP_ROUTER"];
} else {
$DHCProuter = "";
}
// This setting has been added later, we have to check if it exists
if (isset($setupVars["DHCP_LEASETIME"])) {
$DHCPleasetime = $setupVars["DHCP_LEASETIME"];