From: Michael Date: Mon, 6 Aug 2018 19:59:41 +0000 (+0000) Subject: Issue 5541: Don't do magic things when the remote site doesn't support it X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=492130313342b338f012df67cf04afcd3bde2b03;p=friendica.git Issue 5541: Don't do magic things when the remote site doesn't support it --- diff --git a/index.php b/index.php index 41e177ce3b..8b0bd47251 100644 --- a/index.php +++ b/index.php @@ -107,7 +107,7 @@ if (x($_SESSION, 'language') && ($_SESSION['language'] !== $lang)) { L10n::loadTranslationTable($lang); } -if ((x($_GET,'zrl')) && $a->mode == App::MODE_NORMAL) { +if (!empty($_GET['zrl']) && $a->mode == App::MODE_NORMAL) { $a->query_string = Profile::stripZrls($a->query_string); if (!local_user()) { // Only continue when the given profile link seems valid diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 8d859b7905..29601ad32d 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -1050,7 +1050,11 @@ class Profile $basepath = $urlarr[0]; if ($basepath != System::baseUrl() && !strstr($dest, '/magic') && !strstr($dest, '/rmagic')) { - goaway($basepath . '/magic' . '?f=&owa=1&dest=' . $dest); + $magic_path = $basepath . '/magic' . '?f=&owa=1&dest=' . $dest; + $serverret = Network::curl($magic_path); + if (!empty($serverret['success'])) { + goaway($magic_path); + } } } }