AdguardTeam / Scriptlets

AdGuard scriptlets library
GNU General Public License v3.0
138 stars 27 forks source link

Improve 'set-cookie' — add 'domain' parameter #389

Closed Alex-302 closed 3 months ago

Alex-302 commented 7 months ago

Related to https://github.com/AdguardTeam/AdguardFilters/issues/168097

At the moment, impossible to specify cookie's domain. Scriptlet create's a cookie with domain = www.walmart.ca

On walmart.ca this cookie is not accepted by the site (www.walmart.ca)

uxcon   enforce=false&p13n=false&ads=false&createdAt=1702648473855&modifiedAt=1702648511162 www.walmart.ca  /   2024-12-14T14:08:48.000Z    88                  Medium  

this accepted (.walmart.ca)

uxcon   enforce=false&p13n=false&ads=false&createdAt=1702648473855&modifiedAt=1702648511162 .walmart.ca /   2024-12-14T14:03:30.000Z    88                  Medium

Unblock walmart.ca#%#document.cookie = "uxcon=enforce=false&p13n=false&ads=false&createdAt=1672531204&modifiedAt=1672531204; domain=.walmart.ca; path=/"; before test.

Alex-302 commented 4 months ago

Another case https://github.com/AdguardTeam/AdguardFilters/issues/173828

image