1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-30 10:36:35 +02:00

Server: Also clear admin session ID on logout after impersonating a user

This commit is contained in:
Laurent Cozic 2021-09-27 18:34:12 +01:00
parent 8c9331cf61
commit 24945a0d3e

View File

@ -11,6 +11,7 @@ const router = new Router(RouteType.Web);
router.post('logout', async (_path: SubPath, ctx: AppContext) => {
const sessionId = contextSessionId(ctx, false);
cookieSet(ctx, 'sessionId', '');
cookieSet(ctx, 'adminSessionId', '');
await ctx.joplin.models.session().logout(sessionId);
return redirect(ctx, `${config().baseUrl}/login`);
});