forked from lix-project/hydra
Fix referer check
This commit is contained in:
parent
c928c41ee1
commit
5d8fbc6ca1
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ sub begin :Private {
|
||||||
$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 && $referer eq $base;
|
unless defined $referer && substr($referer, 0, length $base) eq $base;
|
||||||
}
|
}
|
||||||
|
|
||||||
$c->forward('deserialize');
|
$c->forward('deserialize');
|
||||||
|
|
Loading…
Reference in a new issue