X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Ffollow.php;h=8910f54c0c086ebb1cdeaf3f579ac9b514e8f3ec;hb=016c99935cfbd4d320f15037cf00a53589a0615d;hp=c62c03775959afcf819a9d42bf9cab0797021fda;hpb=16acf1db95f2154586027443f6bade39d32f9537;p=friendica.git diff --git a/mod/follow.php b/mod/follow.php index c62c037759..8910f54c0c 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -1,7 +1,24 @@ . + * */ + use Friendica\App; use Friendica\Core\Protocol; use Friendica\Core\Renderer; @@ -23,15 +40,14 @@ function follow_post(App $a) DI::baseUrl()->redirect('contact'); } - $uid = local_user(); - $url = Strings::escapeTags(trim($_REQUEST['url'])); + $url = Probe::cleanURI($_REQUEST['url']); $return_path = 'follow?url=' . urlencode($url); // Makes the connection request for friendica contacts easier // This is just a precaution if maybe this page is called somewhere directly via POST $_SESSION['fastlane'] = $url; - $result = Contact::createFromProbe($uid, $url, true); + $result = Contact::createFromProbe($a->user, $url, true); if ($result['success'] == false) { // Possibly it is a remote item and not an account