464555 - ALPN module download attempts to download jar before dir exists

+ Ensure directory exists for output before download is attempted.
This commit is contained in:
Joakim Erdfelt 2015-04-13 17:36:04 -07:00
parent 0e2b1856b5
commit 05784f46b4
2 changed files with 5 additions and 6 deletions

View File

@ -251,11 +251,15 @@ public class BaseBuilder
{
if (startArgs.isDownload() && (arg.uri != null))
{
// now on copy/download paths (be safe above all else)
if (!file.startsWith(baseHome.getBasePath()))
{
throw new IOException("For security reasons, Jetty start is unable to process file resource not in ${jetty.base} - " + file);
throw new IOException("For security reasons, Jetty start is unable to process maven file resource not in ${jetty.base} - " + file);
}
// make the directories in ${jetty.base} that we need
FS.ensureDirectoryExists(file.getParent());
URI uri = URI.create(arg.uri);
// Process via initializers

View File

@ -108,11 +108,6 @@ public class MavenLocalRepoFileInitializer extends UriFileInitializer implements
return true;
}
if (!file.startsWith(baseHome.getBasePath()))
{
throw new IOException("For security reasons, Jetty start is unable to process maven file resource not in ${jetty.base} - " + file);
}
// If using local repository
if (this.localRepositoryDir != null)
{