Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thanks for your Fix,But I still get warning from Chrome & Firefox without 'secure' #7

Open
mugua opened this issue May 18, 2020 · 20 comments

Comments

@mugua
Copy link

mugua commented May 18, 2020

Hi, Thanks for your Fix,But I still get warning from Chrome & Firefox without 'secure'。
The Chrome warning is below:
A cookie associated with a cross-site resource at http://baidu.com/ was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
The Firefox warning is below:
由于 Cookie “PHPSESSID”的“sameSite”属性设置为“none”,但缺少“secure”属性,此 Cookie 未来将被拒绝。若要了解“sameSite“的更多信息,请参阅:
(This cookie will be rejected in the future because the 'samesite' property of the cookie 'phpsessid' is set to 'none', but the 'secure' property is missing. To learn more about "samesite," see:)
https://developer.mozilla.org/docs/Web/HTTP/Cookies

@HirokazuNishi
Copy link
Contributor

Hi @mugua, could you attach your screenshot?

@mugua
Copy link
Author

mugua commented May 19, 2020

@HirokazuNishi FYI.
image

@HirokazuNishi
Copy link
Contributor

@mugua Thanks. Is your website correctly configured to use SSL/TLS?

@mugua
Copy link
Author

mugua commented May 19, 2020

Yes, it's configured to use SSL/TLS yet.
image
image

@mugua
Copy link
Author

mugua commented May 19, 2020

My Nginx setting is force http to https.

@HirokazuNishi
Copy link
Contributor

Strange. What PHP & Magento version do you use?
Also which version of our extension?

@mugua
Copy link
Author

mugua commented May 19, 2020

Magento 2.3.5-p1, Php 7.3.x and your latest version...

@mugua
Copy link
Author

mugua commented May 19, 2020

It sames that is the Magento 2.3.5-p1's bug...

@HirokazuNishi
Copy link
Contributor

Of course I tested 2.3.5-p1 with both PHP 7.2/7.3. The extension works fine for my env.
Did you test it on vanilla Magento 2.3.5-p1?

@mugua
Copy link
Author

mugua commented May 19, 2020

Can you show the secure attribute in frontend ? I only can show httponly and samesite=none.

@HirokazuNishi
Copy link
Contributor

My local has both SameSite and Secure flags on frontend. Of course I'm using 2.3.5-p1 and latest.
samesite-cookie

@mugua
Copy link
Author

mugua commented May 19, 2020

I found that the magento Marketplace has the same issue.
you can have a look at https://marketplace.magento.com
Thanks.

@mugua
Copy link
Author

mugua commented May 19, 2020

图片
It the same as me.

@HirokazuNishi
Copy link
Contributor

It's not Magento's marketplace issue. These cookies weren't set SameSite or Secure attribute by their origin. You can only control your website scope cookie. However I don't know why your environment doesn't work as expected. Did you install other extensions?

@mugua
Copy link
Author

mugua commented May 19, 2020

yeah, Codazon Infinit theme, wechatpay and alipay extensions and so on...

@HirokazuNishi
Copy link
Contributor

Please test vanilla Magento. Extensions and themes sometimes cause serious conflicts.

@mugua
Copy link
Author

mugua commented May 19, 2020

OK, I'LL TRY IT...

@mugua
Copy link
Author

mugua commented May 19, 2020

I run a clean Magento 2.3.5-p1, It is still haven't secure tag...
图片

@mugua
Copy link
Author

mugua commented May 19, 2020

it seems that 2.4-dev still have this problem...
magento/magento2#27879

@niro08
Copy link

niro08 commented Aug 17, 2020

@mugua, I had the same problem. It looks like you have a different "base_url" and "base_secure_url". As a result false is passed to the setCookieSecure function in vendor/magento/framework/Session/Config.php file (see screenshot)
2020-08-17 11 06 25 (1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants