forked from mirror/pixelfed
Update FederationController, return 404 for invalid webfinger addresses. Fixes #2647
This commit is contained in:
parent
723eb00039
commit
deb6f1153f
|
@ -53,8 +53,8 @@ class FederationController extends Controller
|
|||
|
||||
$resource = $request->input('resource');
|
||||
$parsed = Nickname::normalizeProfileUrl($resource);
|
||||
if($parsed['domain'] !== config('pixelfed.domain.app')) {
|
||||
abort(400);
|
||||
if(empty($parsed) || $parsed['domain'] !== config('pixelfed.domain.app')) {
|
||||
abort(404);
|
||||
}
|
||||
$username = $parsed['username'];
|
||||
$profile = Profile::whereNull('domain')->whereUsername($username)->firstOrFail();
|
||||
|
|
Loading…
Reference in New Issue