Strict samesite cookies
This commit is contained in:
parent
3d4e1f1b14
commit
768fdd04bb
|
@ -5,6 +5,7 @@ use Backend\Models\Group;
|
|||
use Backend\Models\Password;
|
||||
session_start();
|
||||
|
||||
|
||||
/**
|
||||
* @param string $token
|
||||
* @return Group|null ;
|
||||
|
@ -46,6 +47,11 @@ function passwordValidate(string $password1): bool
|
|||
|
||||
function makeLogin(string $groupName, int $groupId)
|
||||
{
|
||||
setcookie("groupName", $groupName, 0, "/");
|
||||
setcookie("groupId", $groupId, 0, "/");
|
||||
$cookieCon = array(
|
||||
'expires' => 0,
|
||||
'samesite' => 'Strict',
|
||||
'path' => '/'
|
||||
);
|
||||
setcookie("groupName", $groupName, $cookieCon);
|
||||
setcookie("groupId", $groupId, $cookieCon);
|
||||
}
|
Loading…
Reference in New Issue