From: Michael Date: Tue, 24 Sep 2019 21:44:37 +0000 (+0000) Subject: Don't use the "url" parameter on redir if it points to the same contact X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=87462ec67f5464a7ab6f4d25ea0d484f344cbdac;p=friendica.git Don't use the "url" parameter on redir if it points to the same contact --- diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 798c9cd209..1e3d0b9154 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1193,7 +1193,7 @@ class Contact extends BaseObject $sparkle = false; if (($contact['network'] === Protocol::DFRN) && !$contact['self'] && empty($contact['pending'])) { $sparkle = true; - $profile_link = System::baseUrl() . '/redir/' . $contact['id'] . '?url=' . $contact['url']; + $profile_link = System::baseUrl() . '/redir/' . $contact['id']; } else { $profile_link = $contact['url']; } @@ -2744,7 +2744,7 @@ class Contact extends BaseObject $redirect = 'redir/' . $contact['id']; - if ($url != '') { + if (($url != '') && !Strings::compareLink($contact['url'], $url)) { $redirect .= '?url=' . $url; }