diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index e94f9d9c..411065d3 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -1,5 +1,6 @@ package Hydra::Controller::Build; +use utf8; use strict; use warnings; use base 'Hydra::Base::Controller::NixChannel'; @@ -18,6 +19,8 @@ use Encode; sub buildChain :Chained('/') :PathPart('build') :CaptureArgs(1) { my ($self, $c, $id) = @_; + $id =~ /^[0-9]+$/ or error($c, "Invalid build ID ‘$id’."); + $c->stash->{id} = $id; $c->stash->{build} = getBuild($c, $id);