Update FederationController

This commit is contained in:
Daniel Supernault 2019-04-01 21:15:34 -06:00
parent 788c8bc640
commit 372a28c56a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -35,8 +35,8 @@ class FederationController extends Controller
{ {
$this->authCheck(); $this->authCheck();
$this->validate($request, [ $this->validate($request, [
'acct' => 'required|string|min:3|max:255', 'acct' => 'required|string|min:3|max:255',
]); ]);
$acct = $request->input('acct'); $acct = $request->input('acct');
$nickname = Nickname::normalizeProfileUrl($acct); $nickname = Nickname::normalizeProfileUrl($acct);
@ -63,6 +63,11 @@ class FederationController extends Controller
$follower = Auth::user()->profile; $follower = Auth::user()->profile;
$url = $request->input('url'); $url = $request->input('url');
$url = Helpers::validateUrl($url);
if(!$url) {
return;
}
RemoteFollowPipeline::dispatch($follower, $url); RemoteFollowPipeline::dispatch($follower, $url);