-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Labels
Description
It seems that website is not reloaded if rule like this:
example.org#%#//scriptlet('trusted-set-cookie-reload', 'cmpconsent', '$now$')
is used.
Probably the problem is with value === cookieValue
here:
Scriptlets/src/helpers/cookie-utils.js
Lines 126 to 138 in 85e6beb
export const isCookieSetWithValue = (cookieString, name, value) => { | |
return cookieString.split(';') | |
.some((cookieStr) => { | |
const pos = cookieStr.indexOf('='); | |
if (pos === -1) { | |
return false; | |
} | |
const cookieName = cookieStr.slice(0, pos).trim(); | |
const cookieValue = cookieStr.slice(pos + 1).trim(); | |
return name === cookieName && value === cookieValue; | |
}); | |
}; |
The value
is $now$
, but cookieValue
is created by Date.now().toString()
, so it's something like 1677324255603
and function returns false
.