struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Newfield <>
Subject Re: File download problem
Date Tue, 28 Aug 2007 19:33:27 GMT wrote:
> I get the following error, when I try downloading files through the File 
> download Struts2 application. I have given the Configuration detail and 
> the Action class. Could someone take a look and let me know where this 
> breaks?

public InputStream getInputStream() throws Exception
does not match
public InputStream getInputStream()

Letting any user set the path:
> public void setInputPath(String value) {
>       inputPath = value;
>   }

Then returning the resource at that path:
>   public InputStream getInputStream() throws Exception {
>       return 
> ServletActionContext.getServletContext().getResourceAsStream(inputPath);
>   }

Seems like a pretty big security hole.  Are you sure this is what you 
want to do?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message