Skip to content
Snippets Groups Projects
Commit e56b2a8c authored by michael.minelli's avatar michael.minelli
Browse files

Security => Fix error not logged in detection

parent 367d0cc3
No related branches found
No related tags found
No related merge requests found
Pipeline #27227 passed
openapi: 3.1.0
info:
title: Dojo API
version: 3.1.3
version: 3.2.0
description: |
**Backend API of the Dojo project.**
......
......@@ -10,7 +10,7 @@ class SecurityMiddleware {
check(checkIfConnected: boolean, ...checkTypes: Array<SecurityCheckType>): (req: express.Request, res: express.Response, next: express.NextFunction) => void {
return async (req: express.Request, res: express.Response, next: express.NextFunction) => {
if ( checkIfConnected ) {
if ( req.session.profile === null ) {
if ( req.session.profile === null || req.session.profile === undefined ) {
return req.session.sendResponse(res, StatusCodes.UNAUTHORIZED);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment