From c9947d7f91a0fea09d7c506fbcebc13302e2581a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Losada=20Hern=C3=A1ndez?= Date: Wed, 28 Aug 2024 20:42:53 +0200 Subject: [PATCH] handle invalid account in account page, redirect to home --- server/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/server/app.js b/server/app.js index 9afc9f270..cc407a20a 100644 --- a/server/app.js +++ b/server/app.js @@ -358,6 +358,7 @@ app.get('/share/:id', asyncHandler(getBrew('share')), asyncHandler(async (req, r //Account Page app.get('/account', asyncHandler(async (req, res, next)=>{ + if(!req.account) return res.redirect('/'); const data = {}; data.title = 'Account Information Page';