[Pkg-mozext-maintainers] Bug#1108878: webext-ublock-origin-firefox: broken "Filter lists" page; listDetails.parent is null
Peter Boughton
debian_issues at sorcerersisle.com
Sun Jul 6 17:12:12 BST 2025
Package: webext-ublock-origin-firefox
Version: 1.62.0+dfsg-0+deb11u1
Severity: important
Tags: patch
Dear Maintainer,
After the recent upgrade, I found the "Filter lists" page broken.
I eventually noticed the console contained:
Uncaught (in promise) TypeError: listDetails.parent is null
onListsReceived moz-extension://9d0566f5-8804-401e-b54b-abc9496cabfd/js/3p-filters.js:255
renderFilterLists moz-extension://9d0566f5-8804-401e-b54b-abc9496cabfd/js/3p-filters.js:305
3p-filters.js:255:39
Editing that line in 3p-filters.js, I appended "listDetails.parent !== null" to the "listDetails.parent !== undefined" check, which resolves the error and allows the page to render as normal.
I briefly checked the code and didn't see any other checks that guarded against both null and undefined, but this check needed both to not error.
I have not investigated whether there's an underlying issue of whatever is assigning/allowing null to listDetails.parent elsewhere in the code or if the value is coming from a filter list, but I guess it's probably the latter.
Thanks,
Peter Boughton
-- System Information:
Debian Release: 11.1
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-0.deb11.21-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: runit (via /run/runit.stopit)
LSM: AppArmor: enabled
webext-ublock-origin-firefox depends on no packages.
Versions of packages webext-ublock-origin-firefox recommends:
ii firefox-esr 128.12.0esr-1~deb11u1
Versions of packages webext-ublock-origin-firefox suggests:
ii ublock-origin-doc 1.62.0+dfsg-0+deb11u1
-- no debconf information
-------------- next part --------------
>From 1553095798c142cd4f9dac15e46d8f6e167c698a Mon Sep 17 00:00:00 2001
From: Peter Boughton <debian at sorcerersisle.com>
Date: Sun, 6 Jul 2025 15:36:01 +0100
Subject: [PATCH] Prevent null listDetails.parent from breaking Filter lists.
---
src/js/3p-filters.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/js/3p-filters.js b/src/js/3p-filters.js
index e551dcfd0f..d32357fc2c 100644
--- a/src/js/3p-filters.js
+++ b/src/js/3p-filters.js
@@ -250,7 +250,7 @@ const renderFilterLists = ( ) => {
groupkey = 'unknown';
}
const groupDetails = listTree[groupkey];
- if ( listDetails.parent !== undefined ) {
+ if ( listDetails.parent !== undefined && listDetails.parent !== null ) {
let lists = groupDetails.lists;
for ( const parent of listDetails.parent.split('|') ) {
if ( lists[parent] === undefined ) {
--
2.30.2
More information about the Pkg-mozext-maintainers
mailing list