]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/RemoteFollow.php
Prevent settings/userexport to be used by anonymous users
[friendica.git] / src / Module / RemoteFollow.php
index bf71b077fd01888deae74dface5203b012ded31f..ee13ce065181721ea9ef4ddc624eddfff11a602e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -28,6 +28,7 @@ use Friendica\Core\Protocol;
 use Friendica\Core\Renderer;
 use Friendica\Core\Search;
 use Friendica\Core\System;
+use Friendica\Model\Contact;
 use Friendica\Model\Profile;
 use Friendica\Network\Probe;
 
@@ -61,8 +62,8 @@ class RemoteFollow extends BaseModule
                }
 
                // Detect the network, make sure the provided URL is valid
-               $data = Probe::uri($url);
-               if ($data['network'] == Protocol::PHANTOM) {
+               $data = Contact::getByURL($url);
+               if (!$data) {
                        notice(DI::l10n()->t("The provided profile link doesn't seem to be valid"));
                        return;
                }