diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index 7ef7c680..4d6db815 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -366,7 +366,7 @@ sub clone_submit : Chained('jobsetChain') PathPart('clone/submit') Args(0) { requirePost($c); my $newJobsetName = trim $c->stash->{params}->{"newjobset"}; - error($c, "Invalid jobset name: $newJobsetName") unless $newJobsetName =~ /^[[:alpha:]][\w\-]*$/; + error($c, "Invalid jobset name: $newJobsetName") if $newJobsetName !~ /^$jobsetNameRE$/; my $newJobset; txn_do($c->model('DB')->schema, sub { diff --git a/src/lib/Hydra/Helper/CatalystUtils.pm b/src/lib/Hydra/Helper/CatalystUtils.pm index 67bfe88e..9f257418 100644 --- a/src/lib/Hydra/Helper/CatalystUtils.pm +++ b/src/lib/Hydra/Helper/CatalystUtils.pm @@ -215,7 +215,7 @@ Readonly our $relPathRE => "(?:$pathCompRE(?:/$pathCompRE)*)"; Readonly our $relNameRE => "(?:[A-Za-z0-9-_][A-Za-z0-9-\._]*)"; Readonly our $attrNameRE => "(?:[A-Za-z_][A-Za-z0-9-_]*)"; Readonly our $projectNameRE => "(?:[A-Za-z_][A-Za-z0-9-_]*)"; -Readonly our $jobsetNameRE => "(?:[A-Za-z_][A-Za-z0-9-_]*)"; +Readonly our $jobsetNameRE => "(?:[A-Za-z_][A-Za-z0-9-_\.]*)"; Readonly our $jobNameRE => "(?:$attrNameRE(?:\\.$attrNameRE)*)"; Readonly our $systemRE => "(?:[a-z0-9_]+-[a-z0-9_]+)"; Readonly our $userNameRE => "(?:[a-z][a-z0-9_\.]*)";