1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 08:14:10 +00:00

Update SiteController, use url validator in redirect endpoint

This commit is contained in:
Daniel Supernault 2021-01-28 21:23:15 -07:00
parent c45ea96eb3
commit 10b178c8ee
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -9,6 +9,7 @@ use App\Util\Lexer\PrettyNumber;
use App\{Follower, Page, Profile, Status, User, UserFilter};
use App\Util\Localization\Localization;
use App\Services\FollowerService;
use App\Util\ActivityPub\Helpers;
class SiteController extends Controller
{
@ -112,6 +113,7 @@ class SiteController extends Controller
'url' => 'required|url'
]);
$url = request()->input('url');
abort_if(Helpers::validateUrl($url) == false, 404);
return view('site.redirect', compact('url'));
}