Skip to content

Commit e5dc694

Browse files
committed
add minimum picture size
1 parent 0316bab commit e5dc694

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

files/lib/system/file/DiscordWebhookAvatarFileProcessor.class.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public function validateUpload(File $file): void
4040
if ($imageData === false) {
4141
throw new UserInputException('file', 'noImage');
4242
}
43+
if ($imageData[0] < 128 || $imageData[1] < 128) {
44+
throw new UserInputException('file', 'tooSmall');
45+
}
4346
}
4447

4548
#[Override]

0 commit comments

Comments
 (0)