Skip to content

Commit

Permalink
[FIXED JENKINS-21639] Prevent creation of job named '.'.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-beck committed Feb 4, 2014
1 parent 3aa812f commit 780b38b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/src/main/java/jenkins/model/Jenkins.java
Expand Up @@ -2993,6 +2993,8 @@ public static void checkGoodName(String name) throws Failure {
if(name==null || name.length()==0)
throw new Failure(Messages.Hudson_NoName());

if(".".equals(name.trim()))
throw new Failure(Messages.Jenkins_NotAllowedName("."));
if("..".equals(name.trim()))
throw new Failure(Messages.Jenkins_NotAllowedName(".."));
for( int i=0; i<name.length(); i++ ) {
Expand Down

0 comments on commit 780b38b

Please sign in to comment.