-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
v0.14.1 #190
v0.14.1 #190
Conversation
Merge branch '0.14.1/mod-del-users' into 0.14.1/stage
// Get a user (must be last as it's a catch-all) | ||
// Admin only | ||
userRouter.get('/:id', adminAuthMiddleware, (req: Request, res: Response) => | ||
userFinder(res, users.find(user => user.unid === req.params.id || user.username === req.params.id))); | ||
|
||
// Delete a user | ||
// Admin only | ||
userRouter.delete('/:id', adminAuthMiddleware, (req: Request, res: Response) => { |
Check failure
Code scanning / CodeQL
Missing rate limiting
|
||
// Update a user meta key/value (/meta can be after /:id because they are not HTTP GET) | ||
// Admin only | ||
userRouter.put('/meta/:id', adminAuthMiddleware, (req: Request, res: Response) => { |
Check failure
Code scanning / CodeQL
Missing rate limiting
|
||
// Delete a user meta key | ||
// Admin only | ||
userRouter.delete('/meta/:id', adminAuthMiddleware, (req: Request, res: Response) => { |
Check failure
Code scanning / CodeQL
Missing rate limiting
Files stored on S3 are currently NOT deleted. See #192 for more info.
|
||
// Sets a username | ||
// Admin only | ||
userRouter.put('/username/:id', adminAuthMiddleware, (req: Request, res: Response) => { |
Check failure
Code scanning / CodeQL
Missing rate limiting
|
||
// Resets a token | ||
// Admin only | ||
userRouter.put('/token/:id', adminAuthMiddleware, (req: Request, res: Response) => { |
Check failure
Code scanning / CodeQL
Missing rate limiting
code = 500; | ||
} | ||
|
||
return res.status(code).type('text').send(err.message ?? err); |
Check warning
Code scanning / CodeQL
Exception text reinterpreted as HTML
// Admin only | ||
userRouter.get('/all', adminAuthMiddleware, (req: Request, res: Response) => res.json(users)); | ||
userRouter.get('/', adminAuthMiddleware, (req: Request, res: Response) => res.json(users)); |
Check failure
Code scanning / CodeQL
Missing rate limiting
userRouter.post('/reset', adminAuthMiddleware, (req: Request, res: Response) => { | ||
const id = req.body.id; | ||
// todo: user-resets using existing password | ||
userRouter.post('/password/reset/:id', adminAuthMiddleware, (req: Request, res: Response) => { |
Check failure
Code scanning / CodeQL
Missing rate limiting
}); | ||
|
||
// Create a new user | ||
// Admin only | ||
userRouter.post('/new', adminAuthMiddleware, (req: Request, res: Response) => { | ||
userRouter.post('/', adminAuthMiddleware, (req: Request, res: Response) => { |
Check failure
Code scanning / CodeQL
Missing rate limiting
Checklist
Enviroment
Description
All changes:
savePerDay
to save uploads inyyyy-mm-dd
folders