mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Fixed set auth cookie issue (#1227)
This commit is contained in:
parent
243d251066
commit
7e7effefc5
1 changed files with 10 additions and 10 deletions
|
@ -88,19 +88,19 @@ function bb_setcookie(string $name, mixed $val, int $lifetime = COOKIE_PERSIST,
|
|||
{
|
||||
global $bb_cfg;
|
||||
|
||||
$cookie = new \Josantonius\Cookie\Cookie(
|
||||
domain: $bb_cfg['cookie_domain'],
|
||||
expires: $lifetime,
|
||||
httpOnly: $httponly,
|
||||
path: $bb_cfg['script_path'],
|
||||
raw: $isRaw,
|
||||
sameSite: $bb_cfg['cookie_same_site'],
|
||||
secure: $bb_cfg['cookie_secure']
|
||||
);
|
||||
|
||||
if (!empty($val)) {
|
||||
$cookie = new \Josantonius\Cookie\Cookie(
|
||||
domain: $bb_cfg['cookie_domain'],
|
||||
expires: $lifetime,
|
||||
httpOnly: $httponly,
|
||||
path: $bb_cfg['script_path'],
|
||||
raw: $isRaw,
|
||||
sameSite: $bb_cfg['cookie_same_site'],
|
||||
secure: $bb_cfg['cookie_secure']
|
||||
);
|
||||
$cookie->set($name, $val);
|
||||
} else {
|
||||
$cookie = new \Josantonius\Cookie\Cookie();
|
||||
$cookie->remove($name);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue