Skip to content

set-cookie scriptlet can cause uncaught error when cookie path / is explicitly specified #4113

Description

@tan-x-y

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

When adding a set-cookie scriptlet filter to My filters that explicitly specifies the cookie path / while using a regex‑based hostname (or when converting an existing plain hostname filter into a regex‑based one), uBO editor throws an uncaught error and fails to render the filter line. For example:

/example\.com/##+js(set-cookie, cookie, accept, /)

Attempting to edit such a filter in My filters immediately triggers:

Uncaught Error: Mode ubo-static-filtering failed to advance stream.

A specific URL where the issue occurs.

extension://odfafepnkmbhccpbejgmiehpchacaeak/dashboard.html#1p-filters.html

Steps to Reproduce

  1. Add a filter using a regex hostname and explicit cookie path to My filters:
/example\.com/##+js(set-cookie, cookie, accept, /)
  1. Observe the uncaught error in the console.

Expected behavior

No error

Troubleshooting information

uBlock Origin: 1.74.0
Chromium: 152
filterset (summary):
 network: 184367
 cosmetic: 43712
 scriptlet: 37702
 html: 0
listset (total-discarded, last-updated):
 default:
  user-filters: 0-0, never
  ublock-filters: 53295-85, 1m
  ublock-badware: 10395-17, 1m
  ublock-privacy: 4147-4, 1m
  ublock-unbreak: 2803-1, 1m
  ublock-quick-fixes: 504-0, 1m
  easylist: 88469-489, 1m
  easyprivacy: 56531-739, 1m
  urlhaus-1: 47575-11, 1m
  plowe-0: 3540-2, 2m
filterset (user): [empty]
userSettings: [none]
hiddenSettings: [none]
supportStats:
 allReadyAfter: 3027 ms
 maxAssetCacheWait: 18 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