diff --git a/server/helpers/custom-validators/misc.ts b/server/helpers/custom-validators/misc.ts index 3dc5504e3..b3ab3ac64 100644 --- a/server/helpers/custom-validators/misc.ts +++ b/server/helpers/custom-validators/misc.ts @@ -103,7 +103,13 @@ function checkMimetypeRegex (fileMimeType: string, mimeTypeRegex: string) { // --------------------------------------------------------------------------- function toCompleteUUID (value: string) { - if (isShortUUID(value)) return shortToUUID(value) + if (isShortUUID(value)) { + try { + return shortToUUID(value) + } catch { + return null + } + } return value }