fix: only call clearCookie for logged in users

v1.18.x
Barış Soner Uşaklı 5 years ago
parent 316913b9bb
commit 630f5d5b85

1
.gitignore vendored

@ -1,3 +1,4 @@
dist/
yarn.lock
npm-debug.log
node_modules/

@ -56,7 +56,7 @@ module.exports = function (middleware) {
}
// Validate session
if (req.uid && !req.session.meta && !res.get('Set-Cookie')) {
if (req.uid > 0 && !req.session.meta && !res.get('Set-Cookie')) {
res.clearCookie(nconf.get('sessionKey'), meta.configs.cookie.get());
}

Loading…
Cancel
Save