mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-04 15:45:52 +00:00
Fixed exception without uploaded Plugin.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@32004 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
a89abe260b
commit
f7faf4b8e8
1 file changed
+2
@@ -548,6 +548,8 @@ public abstract class PluginManager extends AbstractModelObject {
|
||||
// Parse the request
|
||||
FileItem fileItem = (FileItem) upload.parseRequest(req).get(0);
|
||||
String fileName = Util.getFileName(fileItem.getName());
|
||||
if("".equals(fileName))
|
||||
return new HttpRedirect("advanced");
|
||||
if(!fileName.endsWith(".hpi"))
|
||||
throw new Failure(hudson.model.Messages.Hudson_NotAPlugin(fileName));
|
||||
fileItem.write(new File(rootDir, fileName));
|
||||
|
||||
Reference in new issue
Block a user