Blocked (external, IP)";
buttontext = "";
break;
case "7":
- colorClass = "text-red";
- fieldtext = "Blocked (external, NULL)";
+ fieldtext =
+ "Blocked (external, NULL) ";
buttontext = "";
break;
case "8":
- colorClass = "text-red";
- fieldtext = "Blocked (external, NXRA)";
+ fieldtext =
+ "Blocked (external, NXRA) ";
buttontext = "";
break;
case "9":
- colorClass = "text-red";
- fieldtext = "Blocked (gravity, CNAME)";
+ fieldtext = "Blocked (gravity, CNAME) ";
buttontext =
' Whitelist ';
isCNAME = true;
break;
case "10":
- colorClass = "text-red";
- fieldtext = "Blocked (regex blacklist, CNAME)";
+ fieldtext =
+ "Blocked (regex blacklist, CNAME) ";
if (data.length > 9 && data[9] > 0) {
regexLink = true;
@@ -188,32 +186,31 @@ $(function () {
isCNAME = true;
break;
case "11":
- colorClass = "text-red";
- fieldtext = "Blocked (exact blacklist, CNAME)";
+ fieldtext =
+ "Blocked (exact blacklist, CNAME) ";
buttontext =
' Whitelist ';
isCNAME = true;
break;
case "12":
- colorClass = "text-green";
- fieldtext = "Retried";
- buttontext = "";
+ fieldtext = "Retried ";
break;
case "13":
- colorClass = "text-green";
- fieldtext = "Retried (ignored)";
- buttontext = "";
+ fieldtext = "Retried (ignored)";
break;
case "14":
- colorClass = "text-green";
- fieldtext = "OK (already forwarded)" + dnssecStatus;
+ fieldtext =
+ "OK (already forwarded)" +
+ dnssecStatus;
buttontext =
' Blacklist ';
break;
+ case "15":
+ fieldtext =
+ "Blocked (database is busy) ";
+ break;
default:
- colorClass = false;
fieldtext = "Unknown (" + parseInt(data[4], 10) + ")";
- buttontext = "";
}
// Add EDE here if available and not included in dnssecStatus
@@ -224,10 +221,6 @@ $(function () {
fieldtext += ' ';
- if (colorClass !== false) {
- $(row).addClass(colorClass);
- }
-
$("td:eq(4)", row).html(fieldtext);
$("td:eq(6)", row).html(buttontext);
@@ -273,7 +266,8 @@ $(function () {
$("td:eq(5)", row).html(replytext);
- if (data.length > 7) {
+ // Show response time only when reply is not N/A
+ if (data.length > 7 && replyid !== 0) {
var content = $("td:eq(5)", row).html();
$("td:eq(5)", row).html(content + " (" + (0.1 * data[7]).toFixed(1) + "ms)");
}
diff --git a/scripts/pi-hole/php/func.php b/scripts/pi-hole/php/func.php
index 12e41061..4d79872b 100644
--- a/scripts/pi-hole/php/func.php
+++ b/scripts/pi-hole/php/func.php
@@ -472,6 +472,7 @@ function returnSuccess($message = "", $json = true)
function returnError($message = "", $json = true)
{
+ $message = htmlentities($message) ;
if ($json) {
return [ "success" => false, "message" => $message ];
} else {
diff --git a/scripts/pi-hole/php/password.php b/scripts/pi-hole/php/password.php
index 01e7efd6..91888a0b 100644
--- a/scripts/pi-hole/php/password.php
+++ b/scripts/pi-hole/php/password.php
@@ -50,7 +50,8 @@
{
$auth = true;
// Refresh cookie with new expiry
- setcookie('persistentlogin', $pwhash, time()+60*60*24*7);
+ // setcookie( $name, $value, $expire, $path, $domain, $secure, $httponly )
+ setcookie('persistentlogin', $pwhash, time()+60*60*24*7, null, null, null, true );
}
else
{
@@ -79,7 +80,8 @@
// Set persistent cookie if selected
if (isset($_POST['persistentlogin']))
{
- setcookie('persistentlogin', $pwhash, time()+60*60*24*7);
+ // setcookie( $name, $value, $expire, $path, $domain, $secure, $httponly )
+ setcookie('persistentlogin', $pwhash, time()+60*60*24*7, null, null, null, true );
}
header('Location: index.php');
exit();
diff --git a/settings.php b/settings.php
index eace1c24..cc8f9c4f 100644
--- a/settings.php
+++ b/settings.php
@@ -41,7 +41,7 @@ if (isset($_POST["submit"])) {
×
Debug
-
+
@@ -886,7 +886,9 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array("sysadmin", "dns", "piho
When there is a Pi-hole domain set and this box is
ticked, this asks FTL that this domain is purely
local and FTL may answer queries from /etc/hosts or DHCP leases
- but should never forward queries on that domain to any upstream servers.
+ but should never forward queries on that domain to any upstream servers.
+ If Conditional Fowarding is enabled, unticking this box may cause a partial
+ DNS loop under certain circumstances (e.g. if a client would send TLD DNSSEC queries).