diff --git a/src/Hydra/lib/Hydra/Controller/Root.pm b/src/Hydra/lib/Hydra/Controller/Root.pm index 8d35fb8f..59459703 100644 --- a/src/Hydra/lib/Hydra/Controller/Root.pm +++ b/src/Hydra/lib/Hydra/Controller/Root.pm @@ -286,6 +286,8 @@ sub updateReleaseSet { my $description = trim $c->request->params->{"job-$baseName-description"}; my $attrs = trim $c->request->params->{"job-$baseName-attrs"}; + die "Invalid job name: $name" unless $name =~ /^\w+$/; + $releaseSet->releasesetjobs->create( { job => $name , description => $description diff --git a/src/Hydra/root/edit-releaseset.tt b/src/Hydra/root/edit-releaseset.tt index 2b835935..387bd81e 100644 --- a/src/Hydra/root/edit-releaseset.tt +++ b/src/Hydra/root/edit-releaseset.tt @@ -4,6 +4,23 @@