defensive programming before reaction insert

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
This commit is contained in:
ゆめ 2024-12-10 11:03:07 -06:00
parent 8d10b6d846
commit 54d38f029f
No known key found for this signature in database

View file

@ -169,6 +169,10 @@ export class ReactionService {
}
}
if (/['\\]/.test(reaction)) {
throw new IdentifiableError('cf61d38c-598a-49e2-b75a-6c38671fcc43', 'Invalid reaction.');
}
const record: MiNoteReaction = {
id: this.idService.gen(),
noteId: note.id,