mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-29 13:48:46 +02:00
Update app/core/src/main/java/stirling/software/SPDF/controller/api/misc/StampController.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
ceb3155ff7
commit
3542da1b5a
@ -72,7 +72,7 @@ public class StampController {
|
|||||||
MultipartFile stampImage = request.getStampImage();
|
MultipartFile stampImage = request.getStampImage();
|
||||||
if ("image".equalsIgnoreCase(stampType)) {
|
if ("image".equalsIgnoreCase(stampType)) {
|
||||||
String stampImageName = stampImage.getOriginalFilename();
|
String stampImageName = stampImage.getOriginalFilename();
|
||||||
if (stampImageName.contains("..") || stampImageName.startsWith("/")) {
|
if (stampImageName == null || stampImageName.contains("..") || stampImageName.startsWith("/")) {
|
||||||
throw new IllegalArgumentException("Invalid stamp image file path");
|
throw new IllegalArgumentException("Invalid stamp image file path");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user