From da82c3aea4637db2b6b60f39ae4c576514e76a16 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 14 Jun 2020 18:40:02 +0000 Subject: [PATCH] redir - clicking on title of own post leads to access denied error Fixes friendica/friendica#8769 --- mod/redir.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod/redir.php b/mod/redir.php index 4eb662ee3..d928e66df 100644 --- a/mod/redir.php +++ b/mod/redir.php @@ -190,6 +190,10 @@ function redir_check_url(string $contact_url, string $url) } $url_host = parse_url($url, PHP_URL_HOST); + if (empty($url_host)) { + $url_host = parse_url(DI::baseUrl(), PHP_URL_HOST); + } + $contact_url_host = parse_url($contact_url, PHP_URL_HOST); if ($url_host == $contact_url_host) {