]> git.mxchange.org Git - friendica.git/blobdiff - mod/follow.php
Merge pull request #7039 from annando/api-reshare-quote
[friendica.git] / mod / follow.php
index f8e2539d97e2cf6c9e0f14adb266bcc21dd4d2e4..ba4ff35f1923e0556ae6f1451781f41bef778b65 100644 (file)
@@ -12,7 +12,6 @@ use Friendica\Model\Contact;
 use Friendica\Model\Profile;
 use Friendica\Network\Probe;
 use Friendica\Database\DBA;
-use Friendica\Util\Proxy as ProxyUtils;
 use Friendica\Util\Strings;
 
 function follow_post(App $a)
@@ -61,7 +60,16 @@ function follow_content(App $a)
        }
 
        $uid = local_user();
-       $url = Strings::escapeTags(trim($_REQUEST['url']));
+       $url = Strings::escapeTags(trim(defaults($_REQUEST, 'url', '')));
+
+       // Issue 6874: Allow remote following from Peertube
+       if (strpos($url, 'acct:') === 0) {
+               $url = str_replace('acct:', '', $url);
+       }
+
+       if (!$url) {
+               $a->internalRedirect($return_path);
+       }
 
        $submit = L10n::t('Submit Request');