Merge remote-tracking branch 'origin/main' into refactor/codebase-cleanup

# Conflicts:
#	backend/src/routes/adminEvents.js
#	backend/src/routes/protectedImages.js
#	frontend/src/pages/admin/EventDetailsPage.tsx
This commit is contained in:
Paul Nothaft
2026-07-03 11:54:01 +02:00
55 changed files with 4019 additions and 154 deletions
+2 -2
View File
@@ -87,7 +87,7 @@ async function sessionTimeoutMiddleware(req, res, next) {
try {
// Verify token is valid
const decoded = jwt.verify(token, process.env.JWT_SECRET);
const decoded = jwt.verify(token, process.env.JWT_SECRET, { algorithms: ['HS256'] });
// Check if this is an admin token
if (!decoded.id) {
@@ -128,7 +128,7 @@ async function sessionTimeoutMiddleware(req, res, next) {
for (const [oldToken, _] of sessions.entries()) {
if (oldToken !== token) {
try {
const oldDecoded = jwt.verify(oldToken, process.env.JWT_SECRET);
const oldDecoded = jwt.verify(oldToken, process.env.JWT_SECRET, { algorithms: ['HS256'] });
if (oldDecoded.id === userId) {
sessions.delete(oldToken);
}