mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-30 19:39:10 +00:00
ensure extension during rename and delete (#1508)
This commit is contained in:
committed by
GitHub
parent
a5afb32b8a
commit
1f6f3df0f2
@@ -133,7 +133,8 @@ export const validateFilenameParam = [
|
|||||||
.customSanitizer((input: string) => sanitize(input))
|
.customSanitizer((input: string) => sanitize(input))
|
||||||
.withMessage('Failed to sanitize the filename')
|
.withMessage('Failed to sanitize the filename')
|
||||||
.notEmpty()
|
.notEmpty()
|
||||||
.withMessage('Filename was empty or contained only invalid characters'),
|
.withMessage('Filename was empty or contained only invalid characters')
|
||||||
|
.customSanitizer((input: string) => ensureJsonExtension(input)),
|
||||||
|
|
||||||
(req: Request, res: Response, next: NextFunction) => {
|
(req: Request, res: Response, next: NextFunction) => {
|
||||||
const errors = validationResult(req);
|
const errors = validationResult(req);
|
||||||
|
|||||||
Reference in New Issue
Block a user