Skip to content

Commit

Permalink
[FIXED JENKINS-21639] Prevent creation of job named '.'.
Browse files Browse the repository at this point in the history
(cherry picked from commit 780b38b)
  • Loading branch information
daniel-beck authored and olivergondza committed Feb 16, 2014
1 parent 4a6e59b commit fec6b41
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 @@ -2948,6 +2948,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 fec6b41

Please sign in to comment.