Skip to content

listDetails.parent !== undefined too strict and doesn't work when null #3933

@moll

Description

@moll

Prerequisites

  • I verified that this is not a filter list issue. Report any issues with filter lists or broken website functionality in the uAssets issue tracker.
  • This is NOT a YouTube, Facebook or Twitch report. These sites MUST be reported by clicking their respective links.
  • This is not a support issue or a question. For support, questions, or help, visit /r/uBlockOrigin.
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
  • The issue is not present after disabling uBO in the browser.
  • I checked the documentation to understand that the issue I am reporting is not normal behavior.

I tried to reproduce the issue when...

  • uBO is the only extension.
  • uBO uses default lists and settings.
  • using a new, unmodified browser profile.

Description

Hey,

Thanks for maintaining uBlock Origin! Debugging why the filter list page doesn't render at all, I discovered that it tries to render a listDetails item whose parent is null, thereby throwing on line 249 in 3p-filters.js:
https://github.com/gorhill/uBlock/blob/359cb070eb220186afdc7e29570cb447071831ba/src/js/3p-filters.js#L249

It happens currently with the "AdGuard – Social Widgets" list, but given the defensive coding attempt, I'm guessing uBlock Origin intended to work with items lacking parents. It's just that the strict comparison to undefined doesn't catch the null case and therefore still tries to invoke listDetails.parent.split.

A specific URL where the issue occurs.

http://localhost

Steps to Reproduce

Expected behavior

Actual behavior

uBO version

1.68.0

Browser name and version

Firefox v147.0.1

Operating System and version

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions