From f7ff7f741bb7cfff6eab534a03b50e481a9414a2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 24 Oct 2016 16:08:19 +0200 Subject: [PATCH] Fix a couple of encoding issues --- src/lib/Hydra/Controller/Job.pm | 1 + src/lib/Hydra/Controller/JobsetEval.pm | 1 + src/lib/Hydra/Controller/Root.pm | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/Job.pm b/src/lib/Hydra/Controller/Job.pm index ccbae4b6..1147bc76 100644 --- a/src/lib/Hydra/Controller/Job.pm +++ b/src/lib/Hydra/Controller/Job.pm @@ -1,5 +1,6 @@ package Hydra::Controller::Job; +use utf8; use strict; use warnings; use base 'Hydra::Base::Controller::ListBuilds'; diff --git a/src/lib/Hydra/Controller/JobsetEval.pm b/src/lib/Hydra/Controller/JobsetEval.pm index e61b8cac..8593091d 100644 --- a/src/lib/Hydra/Controller/JobsetEval.pm +++ b/src/lib/Hydra/Controller/JobsetEval.pm @@ -1,5 +1,6 @@ package Hydra::Controller::JobsetEval; +use utf8; use strict; use warnings; use base 'Hydra::Base::Controller::NixChannel'; diff --git a/src/lib/Hydra/Controller/Root.pm b/src/lib/Hydra/Controller/Root.pm index f64260ed..0a1a2d10 100644 --- a/src/lib/Hydra/Controller/Root.pm +++ b/src/lib/Hydra/Controller/Root.pm @@ -1,5 +1,6 @@ package Hydra::Controller::Root; +use utf8; use strict; use warnings; use base 'Hydra::Base::Controller::ListBuilds'; @@ -65,7 +66,7 @@ sub begin :Private { my $referer = $c->req->header('Origin'); $referer //= $c->req->header('Referer'); my $base = $c->req->base; - error($c, "POST requests should come from ‘$base’") + error($c, "POST requests should come from ‘$base’.") unless defined $referer && substr($referer, 0, length $base) eq $base; }