Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion routes/fileServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,12 @@
return res.status(400).send('Invalid redirect path');
}

return res.redirect(301, safeRedirectPath);
if (isLocalUrl(safeRedirectPath)) {
return res.redirect(301, safeRedirectPath);
} else {

Check failure on line 243 in routes/fileServer.js

View workflow job for this annotation

GitHub Actions / Lint & Format

Unnecessary 'else' after 'return'
logger.warn('Blocked attempted open redirect', { path: safeRedirectPath });
return res.status(400).send('Invalid redirect path');
}
}
return handleDirectoryListing(req, res, fullPath, requestPath);
}
Expand Down
Loading