OFFLINE-GmbH / oc-gdpr-plugin

October CMS plugin to make websites GDPR and ePrivacy compliant
https://octobercms.com/plugin/offline-gdpr
MIT License
36 stars 20 forks source link

CookieBanner not working #87

Closed dariopetraroia closed 2 years ago

dariopetraroia commented 2 years ago

Hy, I have a problem with the cookie banner, it appears again after close and reopen the browser on Chrome Mobile and Firefox Mobile. The cookieBanner.hide variable is always false.

dariopetraroia commented 2 years ago

UPDATE: The issue happens also on desktop. This is how to reproduce it:

The problem is when you come to the site over a search engine...

https://www.google.com/search?q=offline+gmbh

then click on the first result and visit the website https://offline.ch/ Accept cookie

Search website again https://www.google.com/search?q=offline+gmbh

click on the website, and the banner comes again.

SECOND option to reproduce it:

go to https://offline.ch/ accept cookies and refresh site, banner is showing again.

dariopetraroia commented 2 years ago

Hy, i fixed this by commenting: // self::SAME_SITE // sameSite

    return Cookie::queue(
        'gdpr_cookie_consent',
        $value->toJson(),
        $this->expiry,          // expire
        '/',                    // path
        null,                   // domain
        $this->isHttps(),       // secure
        true,                   // httpOnly
        false,                  // raw
        // self::SAME_SITE         // sameSite
    );
dimti commented 2 years ago

Or setting SameSite to lax https://github.com/dimti/oc-gdpr-plugin/commit/98be902606e924a7ec6f1da0eb92c6274b5d2192

tobias-kuendig commented 2 years ago

Thank you, guys. This is fixed in 83a1574