🤖 format everything with pre-commit by stirlingbot (#4104)

Auto-generated by [create-pull-request][1] with **stirlingbot**

[1]: https://github.com/peter-evans/create-pull-request

Signed-off-by: stirlingbot[bot] <stirlingbot[bot]@users.noreply.github.com>
Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
This commit is contained in:
stirlingbot[bot] 2025-08-02 23:19:52 +01:00 committed by GitHub
parent ae8f68427b
commit 6634b5d6e4
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");
}
}