Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdGuard aliases for set-cookie-reload and trusted-set-cookie-reload are wrong #2881

Closed
8 tasks done
superlex opened this issue Oct 16, 2023 · 3 comments
Closed
8 tasks done
Labels
enhancement New feature or request fixed issue has been addressed

Comments

@superlex
Copy link

superlex commented Oct 16, 2023

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 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

Correct AdGuard syntax to set a cookie and reload:
example.org#%#//scriptlet('set-cookie-reload', 'cookie-set1', '1')
See https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-scriptlets.md#set-cookie-reload

Correct uBlock0 syntax to set a cookie and reload:
example.org##+js(set-cookie, cookie-set3, 3, , reload, 1)
See https://github.com/gorhill/uBlock/wiki/Resources-Library#set-cookiejs-

The same thing applies to trusted-set-cookie
https://github.com/AdguardTeam/Scriptlets/blob/master/wiki/about-trusted-scriptlets.md#trusted-set-cookie-reload
https://github.com/gorhill/uBlock/wiki/Resources-Library#trusted-set-cookiejs-

So,

  • uBlock0 should recognize both of them as correct
  • uBlock0 should convert correct AG syntax into uBlock0 correct syntax

A specific URL where the issue occurs.

example.org

Steps to Reproduce

Add these filters to User Filters List:

example.org#%#//scriptlet('set-cookie-reload', 'cookie-set1', '1')
example.org#%#//scriptlet('set-cookie', 'cookie-set2', '2', '', 'reload', '1')
example.org##+js(set-cookie, cookie-set3, 3, , reload, 1)
!
example.org#%#//scriptlet('trusted-set-cookie-reload', 'cookie-tset1', 'tset1')
example.org#%#//scriptlet('trusted-set-cookie', 'cookie-tset2', 'tset2', '', '', 'reload', '1')
example.org##+js(trusted-set-cookie, cookie-tset3, tset3, , , reload, 1)

Expected behavior

example.org#%#//scriptlet('set-cookie-reload', 'cookie-set1', '1')
example.org##+js(set-cookie, cookie-set3, 3, , reload, 1)
example.org#%#//scriptlet('trusted-set-cookie-reload', 'cookie-tset1', 'tset1')
example.org##+js(trusted-set-cookie, cookie-tset3, tset3, , , reload, 1)

are recognized as correct and applied.

Actual behavior

example.org#%#//scriptlet('set-cookie', 'cookie-set2', '2', '', 'reload', '1')
example.org##+js(set-cookie, cookie-set3, 3, , reload, 1)
example.org#%#//scriptlet('trusted-set-cookie', 'cookie-tset2', 'tset2', '', '', 'reload', '1')
example.org##+js(trusted-set-cookie, cookie-tset3, tset3, , , reload, 1)

are recognized as correct and applied.

uBO version

1.52.2

Browser name and version

Firefox 118

Operating System and version

macOS 11

Screenshot

cookie-reload
@gwarser gwarser added the enhancement New feature or request label Oct 16, 2023
gorhill added a commit to gorhill/uBlock that referenced this issue Oct 18, 2023
@gwarser
Copy link

gwarser commented Oct 29, 2023

image

@gwarser gwarser closed this as completed Oct 29, 2023
@gwarser gwarser added the fixed issue has been addressed label Oct 29, 2023
@Yuki2718
Copy link

Has something changed about position of the reload token? For AdguardTeam/AdguardFilters#180011 portal.payment.eltax.lta.go.jp##+js(set-cookie, xn_cookieconsent, false, , , reload, 1) never works but portal.payment.eltax.lta.go.jp##+js(set-cookie, xn_cookieconsent, false, , reload, 1) does.

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented May 25, 2024

set-cookie has 3 arguments (expire time is fixed as session only) => false, , reload, 1 so false, , , reload, 1 won't work

If you use trusted-set-cookie, it has 4 arguments (custom expire time) => false, , , reload, 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed issue has been addressed
Projects
None yet
Development

No branches or pull requests

4 participants