Skip to content

JSONPath tool: null value makes $..*[[email protected]] both valid and invalid #4047

Description

@Stevoisiak

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

In the JSONPath tool, if the JSON has data with a null value, the expression $..*[[email protected]] or v2:$..*[[email protected]] will not update the result list. Instead, it will continue showing the result for the previously entered expression.

Image Image Image

A specific URL where the issue occurs.

http://localhost:8000/tools/jsonpath-tool.html

Steps to Reproduce

  1. Run and load the JSONPath tool.
  2. Enter the following JSON.
{
  "body": {
    "test": null
  }
}
  1. For the expression, enter $..[[email protected]], then enter $..*[[email protected]].
  2. For the expression, enter $..**[[email protected]], then enter $..*[[email protected]].

Expected behavior

The same result should always be shown when entering $..*[[email protected]].

Troubleshooting information

uBlock Origin: 1.72.0
Chromium: 149
filterset (summary):
 network: 183539
 cosmetic: 92382
 scriptlet: 46635
 html: 0
listset (total-discarded, last-updated):
 added:
  fanboy-cookiemonster: 46965-120, 4d.17h.42m
  ublock-cookies-easylist: 5706-45, 4d.17h.42m
  easylist-newsletters: 9377-17, 4d.17h.42m
  ublock-experimental: 11-0, 2h.33m Δ
 default:
  user-filters: 3-0, never
  ublock-filters: 51786-86, 2h.33m Δ
  ublock-badware: 10244-27, 2h.33m Δ
  ublock-privacy: 4068-3, 2h.33m Δ
  ublock-unbreak: 2771-1, 2h.33m Δ
  ublock-quick-fixes: 468-0, 2h.33m Δ
  easylist: 84720-477, 2h.33m Δ
  easyprivacy: 55913-712, 2h.33m Δ
  urlhaus-1: 48650-11, 7h.33m
  plowe-0: 3504-2, 11d.18h.4m
filterset (user): [array of 3 redacted]
trustedset:
 added: [array of 12 redacted]
 removed:
  chrome-extension-scheme
switchRuleset:
 added: [array of 4 redacted]
userSettings:
 advancedUserEnabled: true
 userFiltersTrusted: true
hiddenSettings:
 trustedListPrefixes: ublock- https://raw.githubusercontent.com/Stevoisiak/Stevos-GenAI-Blocklist/refs/heads/main/GenAI-Blocklist.txt
supportStats:
 allReadyAfter: 879 ms (selfie)
 maxAssetCacheWait: 350 ms
 cacheBackend: indexedDB

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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