mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Improve cookie security; Secure flag
SSL 항상 사용 옵션인 경우 쿠키도 이에 맞추어 SSL 인 경우에만 사용되도록 `secure` flag 를 추가합니다. 선택적 SSL 인 경우 SSL 이 적용되지 않은 구간에서도 쿠키를 읽을 수 있어야 하므로, 적용하지 않습니다.
This commit is contained in:
parent
5ebbbf5b36
commit
c1c9a94623
7 changed files with 26 additions and 9 deletions
|
|
@ -295,7 +295,7 @@ class Session
|
|||
if(!$is_default_domain && !\Context::get('sso_response') && $_COOKIE['sso'] !== md5($current_domain))
|
||||
{
|
||||
// Set sso cookie to prevent multiple simultaneous SSO validation requests.
|
||||
setcookie('sso', md5($current_domain), 0, '/');
|
||||
setcookie('sso', md5($current_domain), 0, '/', null, Context::checkSslEnforce());
|
||||
|
||||
// Redirect to the default site.
|
||||
$sso_request = Security::encrypt($current_url);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue