From 9629929977d1da84b1ce65a5915ed0aa6371b490 Mon Sep 17 00:00:00 2001 From: totegamma Date: Thu, 6 Apr 2023 08:37:18 +0900 Subject: [PATCH] fix misskey-dev/misskey-#10417 (#10418) --- .../queue/processors/ImportCustomEmojisProcessorService.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/backend/src/queue/processors/ImportCustomEmojisProcessorService.ts b/packages/backend/src/queue/processors/ImportCustomEmojisProcessorService.ts index ed96e9a525..cf78d8330c 100644 --- a/packages/backend/src/queue/processors/ImportCustomEmojisProcessorService.ts +++ b/packages/backend/src/queue/processors/ImportCustomEmojisProcessorService.ts @@ -86,6 +86,10 @@ export class ImportCustomEmojisProcessorService { continue; } const emojiInfo = record.emoji; + if (!/^[a-zA-Z0-9_]+$/.test(emojiInfo.name)) { + this.logger.error(`invalid emojiname: ${emojiInfo.name}`); + continue; + } const emojiPath = outputPath + '/' + record.fileName; await this.emojisRepository.delete({ name: emojiInfo.name,