mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-08-02 13:48:15 +02:00
Merge 3542da1b5a
into a5d219ed05
This commit is contained in:
commit
010ef11ec9
@ -70,9 +70,11 @@ public class StampController {
|
|||||||
String stampType = request.getStampType();
|
String stampType = request.getStampType();
|
||||||
String stampText = request.getStampText();
|
String stampText = request.getStampText();
|
||||||
MultipartFile stampImage = request.getStampImage();
|
MultipartFile stampImage = request.getStampImage();
|
||||||
String stampImageName = stampImage.getOriginalFilename();
|
if ("image".equalsIgnoreCase(stampType)) {
|
||||||
if (stampImageName.contains("..") || stampImageName.startsWith("/")) {
|
String stampImageName = stampImage.getOriginalFilename();
|
||||||
throw new IllegalArgumentException("Invalid stamp image file path");
|
if (stampImageName == null || stampImageName.contains("..") || stampImageName.startsWith("/")) {
|
||||||
|
throw new IllegalArgumentException("Invalid stamp image file path");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
String alphabet = request.getAlphabet();
|
String alphabet = request.getAlphabet();
|
||||||
float fontSize = request.getFontSize();
|
float fontSize = request.getFontSize();
|
||||||
|
Loading…
Reference in New Issue
Block a user