Fix referer check

This commit is contained in:
Eelco Dolstra 2016-10-21 17:56:34 +02:00
parent c928c41ee1
commit 5d8fbc6ca1

View file

@ -66,7 +66,7 @@ sub begin :Private {
$referer //= $c->req->header('Referer');
my $base = $c->req->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');