adblock: update 4.5.4-2
authorDirk Brenken <redacted>
Fri, 10 Apr 2026 06:01:05 +0000 (08:01 +0200)
committerDirk Brenken <redacted>
Fri, 10 Apr 2026 06:01:05 +0000 (08:01 +0200)
* refine the DNS reporting filter (stricter),
  to filter out false positives

Signed-off-by: Dirk Brenken <redacted>
net/adblock/Makefile
net/adblock/files/adblock.cgi
net/adblock/files/adblock.sh

index bc6148db30633d36759f186c3ca3c7df7fca84cd..7b6063886bc9835cae30b002daa7a9f7c573ecd1 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
 PKG_VERSION:=4.5.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index 64530252297bc63f9d41dd4391b7edf72926891e..cc35fc84edf4b46e7226b46c819dd8351f8d5cdf 100644 (file)
@@ -177,7 +177,7 @@ function stopRefresh() {
 if [ "${nft_remote}" != "1" ] || [ -z "${nft_macremote}" ]; then
        printf '%s\n' "
                <div class=\"msg err\">
-                       Remote allow is not enabled or no MAC addresses configured
+                       Adblock Remote Allow is not enabled or no MAC addresses configured
                </div>
        </div></body></html>"
        exit 0
@@ -185,7 +185,7 @@ fi
 if [ -z "${query_mac}" ]; then
        printf '%s\n' "
                <div class=\"msg err\">
-                       Could not determine MAC address
+                       MAC address could not be determined
                </div>
        </div></body></html>"
        exit 0
index c69de20a4cd79ce752307177c7ff88994dd48f62..21248ff3679db8eb17112b6a2c7b68919eb858d9 100755 (executable)
@@ -1421,6 +1421,9 @@ f_search() {
        : >"${tmp_result}"
        read -r search_start _ < "/proc/uptime"
        search_start="${search_start%.*}"
+
+       # search recursively for domain and its parent domains until tld is reached
+       #
        while :; do
                search="${domain//./\\.}"
                res="$("${adb_awkcmd}" -F '/|\"|\t| ' "/^(${prefix}${search}${suffix})$/{i++;if(i<=9){printf \"  + %s\n\",\$${field}}else if(i==10){printf \"  + %s\n\",\"[...]\";exit}}" "${adb_finaldir}/${adb_dnsfile}")"
@@ -1430,6 +1433,9 @@ f_search() {
                domain="${tld}"
                tld="${domain#*.}"
        done
+
+       # search exactly for domain in backup files and local block-/allowlist
+       #
        if [ -d "${adb_backupdir}" ]; then
                search="${1//./\\.}"
                printf '%s\n%s\n%s\n' ":::" "::: domain '${1}' in backups and in local block-/allowlist" ":::" >>"${tmp_result}"
@@ -1857,7 +1863,7 @@ f_report() {
                                        # ignore Reverse DNS
                                        /\.in-addr\.arpa/ || /\.ip6\.arpa/ { next }
                                        # domain request parser (with optional EDNS marker support)
-                                       /\+[[:space:]]+(\[.*\][[:space:]]+)?(A\?|AAAA\?)/ {
+                                       /\+[[:space:]]+(\[[0-9a-z]*\][[:space:]]+)?(A\?|AAAA\?)/ {
                                                # drop unresolved previous query
                                                if (pending)
                                                        pending = 0
@@ -1875,6 +1881,7 @@ f_report() {
                                                sub(/[,\.]+$/, "", domain)
                                                if (domain ~ /\.lan$/) next
                                                if (domain !~ /\./) next
+                                               if (domain ~ /[\/:]/) next
                                                qtype = $(NF-2)
                                                sub(/\?$/, "", qtype)
                                                last_date = date
git clone https://git.99rst.org/PROJECT