Veriteworks / CookieFix

Fix Magento2.2/2.3/2.4 Cookie SameSite attribute
Academic Free License v3.0
65 stars 35 forks source link

override SessionManager #5

Closed johnorourke closed 4 years ago

johnorourke commented 4 years ago

...to allow CookieManager to set the session cookie.

See https://github.com/magento/magento2/issues/27531

The actual change is very minor: https://github.com/magento/magento2/pull/27535/files

However, because of all the private properties and methods in SessionManager, we have to override a lot of it to make this change.

johnorourke commented 4 years ago

Sorry one small warning - due to the session_start() call (I think) in the SessionManager::start() method, when you don't have a session cookie already, this will write out two Set-Cookie headers - the second one from our CookieManager, the first from php.

HirokazuNishi commented 4 years ago

@johnorourke Thanks! I didn't watch latest core implementation!