]> git.mxchange.org Git - friendica.git/commitdiff
redir - clicking on title of own post leads to access denied error
authorMichael <heluecht@pirati.ca>
Sun, 14 Jun 2020 18:40:02 +0000 (18:40 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 14 Jun 2020 18:40:02 +0000 (18:40 +0000)
Fixes friendica/friendica#8769

mod/redir.php

index 4eb662ee3dc3b9581f2d6fce66d0d122cbd1489f..d928e66df0c99f910063c73aa5f4af5e24baa441 100644 (file)
@@ -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) {