bug 324360 validate input on getResource since loop logic obscures subclass input validation. Port from jetty 8 rev 324360

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2240 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
David Jencks 2010-09-03 00:55:28 +00:00
parent 109c10b997
commit 1e5ceb27dc
1 changed files with 3 additions and 0 deletions

View File

@ -327,6 +327,9 @@ public class WebAppContext extends ServletContextHandler implements WebAppClassL
@Override
public Resource getResource(String uriInContext) throws MalformedURLException
{
if (uriInContext==null || !uriInContext.startsWith(URIUtil.SLASH))
throw new MalformedURLException(uriInContext);
IOException ioe= null;
Resource resource= null;
int loop=0;