Only redirections to the same host do make sense
This commit is contained in:
parent
723b5ae803
commit
81c002370e
|
@ -1715,14 +1715,17 @@ class Contact extends BaseObject
|
||||||
*/
|
*/
|
||||||
public static function magicLinkbyId($cid, $url = '')
|
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]);
|
$contact = dba::selectFirst('contact', ['network', 'url', 'uid'], ['id' => $cid]);
|
||||||
|
|
||||||
if ($contact['network'] != NETWORK_DFRN) {
|
if ($contact['network'] != NETWORK_DFRN) {
|
||||||
return ($url != '') ? $url : $contact['url'];
|
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) {
|
if ($contact['uid'] != 0) {
|
||||||
return self::magicLink($contact['url'], $url);
|
return self::magicLink($contact['url'], $url);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user