mirror of
				https://github.com/Frooodle/Stirling-PDF.git
				synced 2025-11-01 01:21:18 +01:00 
			
		
		
		
	🤖 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:
		
							parent
							
								
									ae8f68427b
								
							
						
					
					
						commit
						6634b5d6e4
					
				@ -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");
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user