From: Michael Date: Sat, 2 Jun 2018 08:42:46 +0000 (+0000) Subject: Only redirections to the same host do make sense X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=81c002370e6dd833533d6b80e7103b217c93f442;p=friendica.git Only redirections to the same host do make sense --- diff --git a/src/Model/Contact.php b/src/Model/Contact.php index a2c9b48864..84d623c3cf 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1715,14 +1715,17 @@ class Contact extends BaseObject */ public static function magicLinkbyId($cid, $url = '') { - // Direkt auf die URL verweisen, wenn die Host-Angaben unterschiedlich sind - $contact = dba::selectFirst('contact', ['network', 'url', 'uid'], ['id' => $cid]); if ($contact['network'] != NETWORK_DFRN) { return ($url != '') ? $url : $contact['url']; } + // Only redirections to the same host do make sense + if (($url != '') && (parse_url($url, PHP_URL_HOST) != parse_url($contact['url'], PHP_URL_HOST))) { + return $url; + } + if ($contact['uid'] != 0) { return self::magicLink($contact['url'], $url); }