Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/ass/commit/d3181cb1f8e2054356fa8a8f28b141019b3a8313 You should set ROOT_URL correctly, otherwise the web may not work correctly.

fix: new tokens may have `_` or `-`

pull/182/head
tycrek 2 years ago
parent 2abea4894d
commit d3181cb1f8
No known key found for this signature in database
GPG Key ID: FF8A54DCE404885A

@ -37,7 +37,7 @@ bb.extend(router, {
// Block unauthorized requests and attempt token sanitization
router.post('/', (req: Request, res: Response, next: Function) => {
req.headers.authorization = req.headers.authorization || '';
req.token = req.headers.authorization.replace(/[^\da-z]/gi, ''); // Strip anything that isn't a digit or ASCII letter
req.token = req.headers.authorization.replace(/[^\da-z_-]/gi, ''); // Strip anything that isn't a digit, ASCII letter, or underscore/hyphen
!verifyValidToken(req) ? log.warn('Upload blocked', 'Unauthorized').callback(() => res.sendStatus(CODE_UNAUTHORIZED)) : next(); // skipcq: JS-0093
});

Loading…
Cancel
Save