From 3d26bb7fd1b8e366c0418e283e8a65297fc4df9e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 20 Mar 2009 15:19:17 +0000 Subject: [PATCH] * Allow `-' in release set names. --- src/lib/Hydra/Controller/Root.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index 71e63eeb..bb9be77e 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -101,7 +101,7 @@ sub updateReleaseSet { my ($c, $releaseSet) = @_; my $releaseSetName = trim $c->request->params->{name}; - die "Invalid release set name: $releaseSetName" unless $releaseSetName =~ /^[[:alpha:]]\w*$/; + die "Invalid release set name: $releaseSetName" unless $releaseSetName =~ /^[[:alpha:]][\w\-]*$/; $releaseSet->update( { name => $releaseSetName @@ -117,7 +117,7 @@ sub updateReleaseSet { my $description = trim $c->request->params->{"job-$baseName-description"}; my $attrs = trim $c->request->params->{"job-$baseName-attrs"}; - $name =~ /^(\w+):(\w+)$/ or error($c, "Invalid job name: $name"); + $name =~ /^([\w\-]+):([\w\-]+)$/ or error($c, "Invalid job name: $name"); my $jobsetName = $1; my $jobName = $2;