📁 pre-commit

Signed-off-by: stirlingbot[bot] <stirlingbot[bot]@users.noreply.github.com>
This commit is contained in:
stirlingbot[bot] 2025-08-02 22:22:09 +00:00 committed by GitHub
parent ae8f68427b
commit c04a4bbd11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,10 +72,13 @@ public class StampController {
MultipartFile stampImage = request.getStampImage();
if ("image".equalsIgnoreCase(stampType)) {
if (stampImage == null) {
throw new IllegalArgumentException("Stamp image file must be provided when stamp type is 'image'");
throw new IllegalArgumentException(
"Stamp image file must be provided when stamp type is 'image'");
}
String stampImageName = stampImage.getOriginalFilename();
if (stampImageName == null || stampImageName.contains("..") || stampImageName.startsWith("/")) {
if (stampImageName == null
|| stampImageName.contains("..")
|| stampImageName.startsWith("/")) {
throw new IllegalArgumentException("Invalid stamp image file path");
}
}