]> git.mxchange.org Git - friendica.git/commitdiff
Issue 5541: Don't do magic things when the remote site doesn't support it
authorMichael <heluecht@pirati.ca>
Mon, 6 Aug 2018 19:59:41 +0000 (19:59 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 6 Aug 2018 19:59:41 +0000 (19:59 +0000)
index.php
src/Model/Profile.php

index 41e177ce3bedf76da20f0d9b46a0d78287ed5c8e..8b0bd472513fd9c5a1ca9bbd457a60ce963682d3 100644 (file)
--- 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
index 8d859b7905bfc1733d74a07b354242b603b96613..29601ad32daa77f7b2ae88e06df57bbb4a431dbf 100644 (file)
@@ -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);
+                                       }
                                }
                        }
                }