-
Notifications
You must be signed in to change notification settings - Fork 98
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
SameSite cookie support #374
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- TODO PHP7.3 or higher - SameSite=None を未サポートの UA 向けに, SameSite 属性を削除した cookie を発行する - SameSite=None が SameSite=Strict と見なされて cookie が拒否された場合は, 互換用の cookie を読み込む
This comment has been minimized.
This comment has been minimized.
nanasess
commented
Feb 7, 2020
@@ -68,6 +68,11 @@ public function sfSessClose() | |||
*/ | |||
public function sfSessRead($id) | |||
{ | |||
if (empty($_COOKIE['ECSESSID']) && $id !== $_COOKIE['legacy-ECSESSID']) { | |||
// session_id と $_COOKIE['legacy-ECSESSID'] が異なる場合は ECSESSID の cookie が拒否されたと見なす | |||
GC_Utils_Ex::gfPrintLog('replace session id: '.$id.'=>'.$_COOKIE['legacy-ECSESSID']); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
- secure オプションが無い場合は SameSite を空で送る - 互換用 cookie は secure オプション必須にする
@nanasess |
@asano-shinichi はい、ご認識に問題ございません |
@nanasess |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refs EC-CUBE/ec-cube#4457
旧バージョンのサポート
2.4
こちらのパッチを適用する
2.11.x
こちらのパッチを適用する
2.12.x, 2.13.x
data/class/helper/SC_Helper_Session.php
のsfSessRead()
関数に、 こちらの71行目〜77行目までの処理を追加するdata/class/sessionfactory/SC_SessionFactory_UseCookie.php
を上書きするテスト
TODO