forked from lix-project/hydra
Fix a couple of encoding issues
This commit is contained in:
parent
3586bf28e4
commit
f7ff7f741b
|
@ -1,5 +1,6 @@
|
||||||
package Hydra::Controller::Job;
|
package Hydra::Controller::Job;
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use base 'Hydra::Base::Controller::ListBuilds';
|
use base 'Hydra::Base::Controller::ListBuilds';
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package Hydra::Controller::JobsetEval;
|
package Hydra::Controller::JobsetEval;
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use base 'Hydra::Base::Controller::NixChannel';
|
use base 'Hydra::Base::Controller::NixChannel';
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package Hydra::Controller::Root;
|
package Hydra::Controller::Root;
|
||||||
|
|
||||||
|
use utf8;
|
||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use base 'Hydra::Base::Controller::ListBuilds';
|
use base 'Hydra::Base::Controller::ListBuilds';
|
||||||
|
@ -65,7 +66,7 @@ sub begin :Private {
|
||||||
my $referer = $c->req->header('Origin');
|
my $referer = $c->req->header('Origin');
|
||||||
$referer //= $c->req->header('Referer');
|
$referer //= $c->req->header('Referer');
|
||||||
my $base = $c->req->base;
|
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;
|
unless defined $referer && substr($referer, 0, length $base) eq $base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue