struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Gainty <mgai...@hotmail.com>
Subject RE: Issue with jakarta-stream multipart parser
Date Tue, 05 Jan 2016 16:45:30 GMT
difficulty locating error message "Prefix string too short"

If I download struts-2.3.4.1 and expand struts2-2.3.4.1 from https://www.apache.org/dist/struts/2.3.24.1/
struts2-2.3.24.1>grep -S -l "Prefix string too short" *there are no hits?

Please confirm https://www.apache.org/dist/struts/2.3.24.1/ is the struts 2.3.4.1 you are
working with
Martin 
______________________________________________ 
                                                                                         
   


> To: user@struts.apache.org
> From: stephen+lists@jiglu.com
> Subject: Issue with jakarta-stream multipart parser
> Date: Tue, 5 Jan 2016 15:58:30 +0000
> 
> I'm having a problem using the jakarta-stream multipart parser when a 
> filename is used that is just a single character long excluding the 
> suffix. This triggers a check in java.io.File.createTempFile that 
> ensures that a supplied prefix must be at least three characters long:
> 
> java.lang.IllegalArgumentException: Prefix string too short
> 	at java.io.File.createTempFile(Unknown Source)
> 	at 
> org.apache.struts2.dispatcher.multipart.JakartaStreamMultiPartRequest.createTemporaryFile(JakartaStreamMultiPartRequest.java:436)
> 	at 
> org.apache.struts2.dispatcher.multipart.JakartaStreamMultiPartRequest.processFileItemStreamAsFileField(JakartaStreamMultiPartRequest.java:398)
> 	at 
> org.apache.struts2.dispatcher.multipart.JakartaStreamMultiPartRequest.processUpload(JakartaStreamMultiPartRequest.java:313)
> 	at 
> org.apache.struts2.dispatcher.multipart.JakartaStreamMultiPartRequest.parse(JakartaStreamMultiPartRequest.java:247)
> 	at 
> org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.<init>(MultiPartRequestWrapper.java:84)
> 
> Should JakartaStreamMultiPartRequest.createTemporaryFile() add an extra 
> padding character when the prefix is too short? For now I assume the 
> only way to catch it in an action is by looking for that string in the 
> action errors?
> 
> This is with 2.3.24.1.
> 
> Stephen.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message