Skip to content

Commit 8f5ab93

Browse files
deps: bump cookie from 1.1.1 to 2.0.1 (#791)
Co-authored-by: Renée Kooi <renee@kooi.me> Signed-off-by: dependabot[bot] <support@github.com>
1 parent 49f6b5e commit 8f5ab93

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"bcryptjs": "^3.0.1",
3636
"better-sqlite3": "^12.1.0",
3737
"body-parser": "^2.2.0",
38-
"cookie": "^1.0.1",
38+
"cookie": "^2.0.1",
3939
"cookie-parser": "^1.4.4",
4040
"cors": "^2.8.5",
4141
"emittery": "^1.2.0",

‎src/controllers/authenticate.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { randomUUID } from 'node:crypto';
22
import { promisify } from 'node:util';
3-
import cookie from 'cookie';
3+
import { stringifySetCookie } from 'cookie';
44
import jwt from 'jsonwebtoken';
55
import randomString from 'random-string';
66
import nodeFetch from 'node-fetch';
@@ -467,7 +467,9 @@ async function logout(req, res) {
467467

468468
// Clear the legacy `uwsession` cookie.
469469
if (cookies && cookies.uwsession) {
470-
const serialized = cookie.serialize('uwsession', '', {
470+
const serialized = stringifySetCookie({
471+
name: 'uwsession',
472+
value: '',
471473
httpOnly: true,
472474
secure: !!cookieSecure,
473475
path: cookiePath ?? '/',

0 commit comments

Comments
 (0)