From 5369d0dbbfc5233ac1f630b93273f40899342cc8 Mon Sep 17 00:00:00 2001 From: Dirk Brenken Date: Wed, 11 Dec 2019 10:39:10 +0100 Subject: [PATCH] adblock: bugfix 3.8.14 * fix some whitelist issues (see https://forum.openwrt.org/t/adblock-support-thread/507/1101) Signed-off-by: Dirk Brenken --- net/adblock/Makefile | 2 +- net/adblock/files/adblock.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/net/adblock/Makefile b/net/adblock/Makefile index 1c11afab1d..ec64901968 100644 --- a/net/adblock/Makefile +++ b/net/adblock/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=adblock -PKG_VERSION:=3.8.13 +PKG_VERSION:=3.8.14 PKG_RELEASE:=1 PKG_LICENSE:=GPL-3.0-or-later PKG_MAINTAINER:=Dirk Brenken diff --git a/net/adblock/files/adblock.sh b/net/adblock/files/adblock.sh index 0d9a2bb230..5da153a9c7 100755 --- a/net/adblock/files/adblock.sh +++ b/net/adblock/files/adblock.sh @@ -13,7 +13,7 @@ # LC_ALL=C PATH="/usr/sbin:/usr/bin:/sbin:/bin" -adb_ver="3.8.13" +adb_ver="3.8.14" adb_basever="" adb_enabled=0 adb_debug=0 @@ -604,7 +604,7 @@ f_list() out_rc="${?}" if [ "${out_rc}" -eq 0 ] then - adb_whitelist_rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\\.\",\"\\\\.\",\$1);print tolower(\"^\"\$1\"\\\\|\\\\.\"\$1)}" + adb_whitelist_rset="/^([[:alnum:]_-]+\\.)+[[:alpha:]]+([[:space:]]|$)/{gsub(\"\\\\.\",\"\\\\.\",\$1);print tolower(\"^(|.*\\\\.)\"\$1\"$\")}" awk "${adb_whitelist_rset}" "${adb_tmpdir}/tmp.raw.${mode}" > "${adb_tmpdir}/tmp.rem.${mode}" out_rc="${?}" if [ "${out_rc}" -eq 0 ] && [ -n "${adb_dnsallow}" ] @@ -613,6 +613,7 @@ f_list() out_rc="${?}" fi fi + rm -f "${adb_tmpdir}/tmp.raw.${mode}" fi ;; "backup") @@ -670,7 +671,7 @@ f_list() fi if [ -s "${adb_tmpdir}/tmp.rem.whitelist" ] then - grep -vf "${adb_tmpdir}/tmp.rem.whitelist" "${adb_tmpdir}/${adb_dnsfile}" | eval "${adb_dnsdeny}" >> "${adb_dnsdir}/${adb_dnsfile}" + egrep -vf "${adb_tmpdir}/tmp.rem.whitelist" "${adb_tmpdir}/${adb_dnsfile}" | eval "${adb_dnsdeny}" >> "${adb_dnsdir}/${adb_dnsfile}" else eval "${adb_dnsdeny}" "${adb_tmpdir}/${adb_dnsfile}" >> "${adb_dnsdir}/${adb_dnsfile}" fi -- 2.30.2