Skip to content

Commit da4df21

Browse files
sgiehldiosmosis
andauthored
Don't check cookie value if cookie was deleted (matomo-org#17830)
* don't check cookie value if cookie was deleted * add test that ensures no error is logged when setCookieDomain is called w/ valid input Co-authored-by: diosmosis <[email protected]>
1 parent d4f1a13 commit da4df21

File tree

5 files changed

+32
-5
lines changed

5 files changed

+32
-5
lines changed

js/piwik.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@ if (typeof window.Matomo !== 'object') {
24492449
';SameSite=' + sameSite;
24502450

24512451
// check the cookie was actually set
2452-
if (getCookie(cookieName) !== value) {
2452+
if ((!msToExpire || msToExpire >= 0) && getCookie(cookieName) !== value) {
24532453
var msg = 'There was an error setting cookie `' + cookieName + '`. Please check domain and path.';
24542454
logConsoleError(msg);
24552455
}

js/piwik.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

matomo.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)