From c3c3c7a7807a5d196207ad7fdfd4371ee696cac5 Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Wed, 26 Apr 2023 12:26:11 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E2=80=94=20Fix=20bug=20introduc?= =?UTF-8?q?ed=20in=20!87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/Lutim/Controller/Image.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Lutim/Controller/Image.pm b/lib/Lutim/Controller/Image.pm index d56ba4c..c7d6ecb 100644 --- a/lib/Lutim/Controller/Image.pm +++ b/lib/Lutim/Controller/Image.pm @@ -288,7 +288,7 @@ sub add { my $wm = $c->param('watermark'); if ($c->config('disable_api')) { - $unauthorized_api = (!defined($c->req->headers->referrer) || Mojo::URL->new($c->req->headers->referrer)->host ne Mojo::URL->new('https://'.$c->req->headers->host)->host); + my $unauthorized_api = (!defined($c->req->headers->referrer) || Mojo::URL->new($c->req->headers->referrer)->host ne Mojo::URL->new('https://'.$c->req->headers->host)->host); if ($unauthorized_api) { my $msg = $c->l('Sorry, the API is disabled'); $c->app->log->info('Blocked API call for '.$c->ip(1));