From a582d7c8ac9ec4475f2fe5c94e8eca940e056cdf Mon Sep 17 00:00:00 2001
From: Iksas
Date: Thu, 15 Sep 2022 12:05:33 +0200
Subject: [PATCH 01/10] remove workaround for the Safari password button in
dark themes
Signed-off-by: Iksas
---
style/themes/default-dark.css | 3 ---
style/themes/default-darker.css | 3 ---
style/themes/lcars.css | 4 ----
3 files changed, 10 deletions(-)
diff --git a/style/themes/default-dark.css b/style/themes/default-dark.css
index 83a19621..47356749 100644
--- a/style/themes/default-dark.css
+++ b/style/themes/default-dark.css
@@ -554,9 +554,6 @@ fieldset[disabled] .form-control {
background-color: #367fa9 !important;
border: 1px solid #367fa9;
}
-input[type="password"]::-webkit-credentials-auto-fill-button {
- background: #bfc5ca;
-}
input[type="password"]::-webkit-caps-lock-indicator {
filter: invert(100%);
}
diff --git a/style/themes/default-darker.css b/style/themes/default-darker.css
index ceacb580..425134d3 100644
--- a/style/themes/default-darker.css
+++ b/style/themes/default-darker.css
@@ -3653,9 +3653,6 @@ a:focus {
.register-box-body .form-control-feedback {
color: rgb(157, 148, 136);
}
-input[type="password"]::-webkit-credentials-auto-fill-button {
- background: #b1aca3;
-}
input[type="password"]::-webkit-caps-lock-indicator {
filter: invert(100%);
}
diff --git a/style/themes/lcars.css b/style/themes/lcars.css
index b8186cdb..e5f26ae0 100644
--- a/style/themes/lcars.css
+++ b/style/themes/lcars.css
@@ -1853,10 +1853,6 @@ input[type="number"]::-webkit-outer-spin-button {
margin: 0;
}
-input[type="password"]::-webkit-credentials-auto-fill-button {
- background: white;
-}
-
input[type="password"]::-webkit-caps-lock-indicator {
filter: invert(100%);
}
From 58f8738907159fc0bfae8b46c01fa939f55d44d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?=
Date: Thu, 8 Sep 2022 15:30:14 +0200
Subject: [PATCH 02/10] Reverse logic of in/exlcudin queries from long-term
database and rename queryType => statusType
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Christian König
---
api_db.php | 11 ++---
scripts/pi-hole/js/db_queries.js | 71 ++++++++++++++++----------------
2 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/api_db.php b/api_db.php
index 5612de26..ea86b0cc 100644
--- a/api_db.php
+++ b/api_db.php
@@ -76,17 +76,18 @@ if (isset($_GET['getAllQueries']) && $auth) {
$dbquery .= ' status, reply_type, reply_time, dnssec';
$dbquery .= ' FROM query_storage q';
$dbquery .= ' WHERE timestamp >= :from AND timestamp <= :until ';
- if (isset($_GET['types'])) {
- $types = $_GET['types'];
- if (preg_match('/^[0-9]+(?:,[0-9]+)*$/', $types) === 1) {
+ if (isset($_GET['status'])) {
+ // if some query status should be excluded
+ $status = $_GET['status'];
+ if (preg_match('/^[0-9]+(?:,[0-9]+)*$/', $status) === 1) {
// Append selector to DB query. The used regex ensures
// that only numbers, separated by commas are accepted
// to avoid code injection and other malicious things
// We accept only valid lists like "1,2,3"
// We reject ",2,3", "1,2," and similar arguments
- $dbquery .= 'AND status IN ('.$types.') ';
+ $dbquery .= 'AND status NOT IN ('.$status.') ';
} else {
- exit('Error. Selector types specified using an invalid format.');
+ exit('Error. Selector status specified using an invalid format.');
}
}
$dbquery .= 'ORDER BY timestamp ASC';
diff --git a/scripts/pi-hole/js/db_queries.js b/scripts/pi-hole/js/db_queries.js
index 6fe714dd..9afbf402 100644
--- a/scripts/pi-hole/js/db_queries.js
+++ b/scripts/pi-hole/js/db_queries.js
@@ -111,63 +111,63 @@ function handleAjaxError(xhr, textStatus) {
tableApi.draw();
}
-function getQueryTypes() {
- var queryType = [];
- if ($("#type_gravity").prop("checked")) {
- queryType.push(1);
+function excludeStatusTypes() {
+ var statusType = [];
+ if ($("#type_gravity").prop("checked") === false) {
+ statusType.push(1);
}
- if ($("#type_forwarded").prop("checked")) {
- queryType.push([2, 14]);
+ if ($("#type_forwarded").prop("checked") === false) {
+ statusType.push([2, 14]);
}
- if ($("#type_cached").prop("checked")) {
- queryType.push(3);
+ if ($("#type_cached").prop("checked") === false) {
+ statusType.push(3);
}
- if ($("#type_regex").prop("checked")) {
- queryType.push(4);
+ if ($("#type_regex").prop("checked") === false) {
+ statusType.push(4);
}
- if ($("#type_blacklist").prop("checked")) {
- queryType.push(5);
+ if ($("#type_blacklist").prop("checked") === false) {
+ statusType.push(5);
}
- if ($("#type_external").prop("checked")) {
+ if ($("#type_external").prop("checked") === false) {
// Multiple IDs correspond to this status
// We request queries with all of them
- queryType.push([6, 7, 8]);
+ statusType.push([6, 7, 8]);
}
- if ($("#type_gravity_CNAME").prop("checked")) {
- queryType.push(9);
+ if ($("#type_gravity_CNAME").prop("checked") === false) {
+ statusType.push(9);
}
- if ($("#type_regex_CNAME").prop("checked")) {
- queryType.push(10);
+ if ($("#type_regex_CNAME").prop("checked") === false) {
+ statusType.push(10);
}
- if ($("#type_blacklist_CNAME").prop("checked")) {
- queryType.push(11);
+ if ($("#type_blacklist_CNAME").prop("checked") === false) {
+ statusType.push(11);
}
- if ($("#type_retried").prop("checked")) {
+ if ($("#type_retried").prop("checked") === false) {
// Multiple IDs correspond to this status
// We request queries with all of them
- queryType.push([12, 13]);
+ statusType.push([12, 13]);
}
// 14 is defined above
- if ($("#type_dbbusy").prop("checked")) {
- queryType.push(15);
+ if ($("#type_dbbusy").prop("checked") === false) {
+ statusType.push(15);
}
- if ($("#type_special_domain").prop("checked")) {
- queryType.push(16);
+ if ($("#type_special_domain").prop("checked") === false) {
+ statusType.push(16);
}
- return queryType.join(",");
+ return statusType.join(",");
}
var reloadCallback = function () {
@@ -203,10 +203,10 @@ function refreshTableData() {
timeoutWarning.show();
reloadBox.hide();
var APIstring = "api_db.php?getAllQueries&from=" + from + "&until=" + until;
- // Check if query type filtering is enabled
- var queryType = getQueryTypes();
- if (queryType !== "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16") {
- APIstring += "&types=" + queryType;
+ // If status types should be excluded ("unchecked") we add them to the query
+ var statusType = excludeStatusTypes();
+ if (statusType.length > 0) {
+ APIstring += "&status=" + statusType;
}
statistics = [0, 0, 0];
@@ -218,11 +218,10 @@ $(function () {
? "api_db.php?getAllQueries&from=" + from + "&until=" + until
: "api_db.php?getAllQueries=empty";
- // Check if query type filtering is enabled
- var queryType = getQueryTypes();
- if (queryType !== 63) {
- // 63 (0b00111111) = all possible query types are selected
- APIstring += "&types=" + queryType;
+ // If status types should be excluded ("unchecked") we add them to the query
+ var statusType = excludeStatusTypes();
+ if (statusType.length > 0) {
+ APIstring += "&status=" + statusType;
}
tableApi = $("#all-queries").DataTable({
From 148aae47355938f7ed37fe13311dfd0acfb94731 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?=
Date: Fri, 16 Sep 2022 15:24:22 +0200
Subject: [PATCH 03/10] Read DOCKER_VERSION from version file instead of env
variable
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Christian König
---
scripts/pi-hole/php/update_checker.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/pi-hole/php/update_checker.php b/scripts/pi-hole/php/update_checker.php
index 733b1574..4853b3ac 100644
--- a/scripts/pi-hole/php/update_checker.php
+++ b/scripts/pi-hole/php/update_checker.php
@@ -59,7 +59,7 @@ if (!is_readable($versionsfile)) {
}
// Get Pi-hole Docker Tag, if available
- $docker_current = htmlspecialchars(getenv('PIHOLE_DOCKER_TAG'));
+ $docker_current = $versions['DOCKER_VERSION'];
// Get data from GitHub
$core_latest = $versions['GITHUB_CORE_VERSION'];
From 63711dac0813d5959c7c8fd08638519c1ccf2111 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?=
Date: Fri, 16 Sep 2022 16:05:04 +0200
Subject: [PATCH 04/10] Only assign if variable is set
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Christian König
---
scripts/pi-hole/php/update_checker.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/pi-hole/php/update_checker.php b/scripts/pi-hole/php/update_checker.php
index 4853b3ac..fe133073 100644
--- a/scripts/pi-hole/php/update_checker.php
+++ b/scripts/pi-hole/php/update_checker.php
@@ -59,7 +59,11 @@ if (!is_readable($versionsfile)) {
}
// Get Pi-hole Docker Tag, if available
- $docker_current = $versions['DOCKER_VERSION'];
+ if (isset($versions['DOCKER_VERSION'])) {
+ $docker_current = $versions['DOCKER_VERSION'];
+ } else {
+ $docker_current = '';
+ }
// Get data from GitHub
$core_latest = $versions['GITHUB_CORE_VERSION'];
From 38c5fba920083f3ceed4891fd4793ed651fb7841 Mon Sep 17 00:00:00 2001
From: yubiuser
Date: Fri, 16 Sep 2022 19:47:53 +0200
Subject: [PATCH 05/10] Rename status to excludeStatus
Co-authored-by: RD WebDesign
Signed-off-by: yubiuser
---
api_db.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/api_db.php b/api_db.php
index ea86b0cc..1f4f6bd3 100644
--- a/api_db.php
+++ b/api_db.php
@@ -78,14 +78,14 @@ if (isset($_GET['getAllQueries']) && $auth) {
$dbquery .= ' WHERE timestamp >= :from AND timestamp <= :until ';
if (isset($_GET['status'])) {
// if some query status should be excluded
- $status = $_GET['status'];
- if (preg_match('/^[0-9]+(?:,[0-9]+)*$/', $status) === 1) {
+ $excludedStatus = $_GET['status'];
+ if (preg_match('/^[0-9]+(?:,[0-9]+)*$/', $excludedStatus) === 1) {
// Append selector to DB query. The used regex ensures
// that only numbers, separated by commas are accepted
// to avoid code injection and other malicious things
// We accept only valid lists like "1,2,3"
// We reject ",2,3", "1,2," and similar arguments
- $dbquery .= 'AND status NOT IN ('.$status.') ';
+ $dbquery .= 'AND status NOT IN ('.$excludedStatus.') ';
} else {
exit('Error. Selector status specified using an invalid format.');
}
From 93db592f7422e9aa5908f451710cae95a1f68ae5 Mon Sep 17 00:00:00 2001
From: RD WebDesign
Date: Sat, 17 Sep 2022 02:16:49 -0300
Subject: [PATCH 06/10] Add test to avoid PHP warning
Signed-off-by: RD WebDesign
---
scripts/pi-hole/php/groups.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/pi-hole/php/groups.php b/scripts/pi-hole/php/groups.php
index 889cfcd9..7357b037 100644
--- a/scripts/pi-hole/php/groups.php
+++ b/scripts/pi-hole/php/groups.php
@@ -596,7 +596,7 @@ if ($_POST['action'] == 'get_groups') {
continue;
}
- if ($_POST['type'] != '2' && $_POST['type'] != '3') {
+ if (isset($_POST['type']) && $_POST['type'] != '2' && $_POST['type'] != '3') {
// If not adding a RegEx....
$input = $domain;
// Convert domain name to IDNA ASCII form for international domains
From 54f4e349e5ca3272727d2f8b31af6b5f99befb81 Mon Sep 17 00:00:00 2001
From: RD WebDesign
Date: Sat, 17 Sep 2022 02:33:14 -0300
Subject: [PATCH 07/10] Update Dashboard and Login Screen images
Signed-off-by: RD WebDesign
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 1de6119b..fd355f72 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@
-
+
@@ -112,7 +112,7 @@ While we are primarily reachable on our
-
+
## Detailed graphs and doughnut charts
From e4abebbe8a926519090b6c950bf207ee13264b57 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sat, 17 Sep 2022 10:19:01 +0000
Subject: [PATCH 08/10] Bump actions/stale from 5.1.1 to 5.2.0
Bumps [actions/stale](https://github.com/actions/stale) from 5.1.1 to 5.2.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5.1.1...v5.2.0)
---
updated-dependencies:
- dependency-name: actions/stale
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
---
.github/workflows/stale.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 803c3377..0cddab2f 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -13,7 +13,7 @@ jobs:
issues: write
steps:
- - uses: actions/stale@v5.1.1
+ - uses: actions/stale@v5.2.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 30
From ed1a9a1a6387209e7e25c6e847c44214b2920286 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Sat, 17 Sep 2022 11:59:53 +0000
Subject: [PATCH 09/10] Bump autoprefixer from 10.4.8 to 10.4.11
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.8 to 10.4.11.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.8...10.4.11)
---
updated-dependencies:
- dependency-name: autoprefixer
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
---
package-lock.json | 40 +++++++++++++++++++++++-----------------
package.json | 2 +-
2 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index afc82b84..c98354f9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -287,13 +287,13 @@
}
},
"autoprefixer": {
- "version": "10.4.8",
- "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.8.tgz",
- "integrity": "sha512-75Jr6Q/XpTqEf6D2ltS5uMewJIx5irCU1oBYJrWjFenq/m12WRRrz6g15L1EIoYvPLXTbEry7rDOwrcYNj77xw==",
+ "version": "10.4.11",
+ "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.11.tgz",
+ "integrity": "sha512-5lHp6DgRodxlBLSkzHOTcufWFflH1ewfy2hvFQyjrblBFlP/0Yh4O/Wrg4ow8WRlN3AAUFFLAQwX8hTptzqVHg==",
"dev": true,
"requires": {
"browserslist": "^4.21.3",
- "caniuse-lite": "^1.0.30001373",
+ "caniuse-lite": "^1.0.30001399",
"fraction.js": "^4.2.0",
"normalize-range": "^0.1.2",
"picocolors": "^1.0.0",
@@ -301,21 +301,27 @@
},
"dependencies": {
"browserslist": {
- "version": "4.21.3",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.3.tgz",
- "integrity": "sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==",
+ "version": "4.21.4",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz",
+ "integrity": "sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==",
"dev": true,
"requires": {
- "caniuse-lite": "^1.0.30001370",
- "electron-to-chromium": "^1.4.202",
+ "caniuse-lite": "^1.0.30001400",
+ "electron-to-chromium": "^1.4.251",
"node-releases": "^2.0.6",
- "update-browserslist-db": "^1.0.5"
+ "update-browserslist-db": "^1.0.9"
}
},
+ "caniuse-lite": {
+ "version": "1.0.30001402",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001402.tgz",
+ "integrity": "sha512-Mx4MlhXO5NwuvXGgVb+hg65HZ+bhUYsz8QtDGDo2QmaJS2GBX47Xfi2koL86lc8K+l+htXeTEB/Aeqvezoo6Ew==",
+ "dev": true
+ },
"electron-to-chromium": {
- "version": "1.4.206",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.206.tgz",
- "integrity": "sha512-h+Fadt1gIaQ06JaIiyqPsBjJ08fV5Q7md+V8bUvQW/9OvXfL2LRICTz2EcnnCP7QzrFTS6/27MRV6Bl9Yn97zA==",
+ "version": "1.4.254",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.254.tgz",
+ "integrity": "sha512-Sh/7YsHqQYkA6ZHuHMy24e6TE4eX6KZVsZb9E/DvU1nQRIrH4BflO/4k+83tfdYvDl+MObvlqHPRICzEdC9c6Q==",
"dev": true
},
"node-releases": {
@@ -2503,7 +2509,7 @@
"normalize-range": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
- "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=",
+ "integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
"dev": true
},
"npm-run-path": {
@@ -3360,9 +3366,9 @@
"dev": true
},
"update-browserslist-db": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz",
- "integrity": "sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==",
+ "version": "1.0.9",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.9.tgz",
+ "integrity": "sha512-/xsqn21EGVdXI3EXSum1Yckj3ZVZugqyOZQ/CxYPBD/R+ko9NSUScf8tFF4dOKY+2pvSSJA/S+5B8s4Zr4kyvg==",
"dev": true,
"requires": {
"escalade": "^3.1.1",
diff --git a/package.json b/package.json
index dfd3061b..39982f65 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
"testpr": "npm run prettier:fix && git diff --ws-error-highlight=all --color=always --exit-code && npm run xo"
},
"devDependencies": {
- "autoprefixer": "^10.4.8",
+ "autoprefixer": "^10.4.11",
"eslint-plugin-compat": "^4.0.2",
"postcss": "^8.4.16",
"postcss-cli": "^10.0.0",
From 0fc5bd679a641ed1ac0e7066bf9505458848e989 Mon Sep 17 00:00:00 2001
From: RD WebDesign
Date: Sat, 17 Sep 2022 15:44:23 -0300
Subject: [PATCH 10/10] Remove image fixed height
Signed-off-by: RD WebDesign
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index fd355f72..ad323bab 100644
--- a/README.md
+++ b/README.md
@@ -112,7 +112,7 @@ While we are primarily reachable on our
-
+
## Detailed graphs and doughnut charts