Skip to content

Commit

Permalink
Add the SameSite attribute to Lax for the cookieconsent_categories, c…
Browse files Browse the repository at this point in the history
…ookieconsent_onscroll_scripts and cookieconsent_scripts cookies
  • Loading branch information
ChristianaHoJo committed Apr 5, 2024
1 parent d77e787 commit b30b434
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v0.1.14
## 04/05/2024
1. [](#improved)
* Add the "SameSite" attribute to "Lax" for the "cookieconsent_categories", "cookieconsent_onscroll_scripts" and "cookieconsent_scripts" cookies to comply with Firefox warnings and ensure consistent behavior.

# v0.1.13
## 04/04/2024
1. [](#improved)
Expand Down Expand Up @@ -32,7 +37,7 @@
# v0.1.5
## 02/02/2022
1. [](#new)
* add pull requests from git hub to solve bugs
* add pull requests from github to solve bugs

# v0.1.4
## 12/12/2021
Expand Down
7 changes: 3 additions & 4 deletions assets/js/tecart-cookie-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class TecartCookieBanner{
}
const expires = this.cookieExpireDate();
const json_string = JSON.stringify(cookieConsentCategoriesArray);
document.cookie = 'cookieconsent_categories=' + json_string + ';' + expires + ';path=/';
document.cookie = 'cookieconsent_categories=' + json_string + ';' + expires + ';path=/; SameSite=Lax;';
}

/**
Expand All @@ -180,7 +180,7 @@ class TecartCookieBanner{
}
const expires = this.cookieExpireDate();
const json_string = JSON.stringify(cookieConsentScriptsArray);
document.cookie = 'cookieconsent_scripts=' + json_string + ';' + expires + ';path=/';
document.cookie = 'cookieconsent_scripts=' + json_string + ';' + expires + ';path=/; SameSite=Lax;';
}

/**
Expand All @@ -192,7 +192,7 @@ class TecartCookieBanner{
}
const expires = this.cookieExpireDate();
const json_string = JSON.stringify(cookieConsentOnScrollScriptsArray);
document.cookie = 'cookieconsent_onscroll_scripts=' + json_string + ';' + expires + ';path=/';
document.cookie = 'cookieconsent_onscroll_scripts=' + json_string + ';' + expires + ';path=/; SameSite=Lax;';
}

/**
Expand Down Expand Up @@ -612,7 +612,6 @@ class TecartCookieBanner{
tabSaveSettingsLayout = this.cookieBannerCategoriesData.categories_save_layout;
}


const tabs = '<div id="tcbSettings" class="tcb-catTabs">' +
tabSection+
'</div>' +
Expand Down
2 changes: 1 addition & 1 deletion assets/js/tecart-cookie-manager.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: TecArt Cookie Manager
version: 0.1.13
version: 0.1.14
description: "TecArt cookie banner manager provides a cookie banner plugin with complete cookie management in admin and extended frontend views. The plugin is created by [TecArt GmbH](https://www.tecart.de) and based on the popular [CookieConsent](https://cookieconsent.osano.com/) JS-library by Osano."
icon: shield
author:
Expand Down

0 comments on commit b30b434

Please sign in to comment.