Update SiteController, use url validator in redirect endpoint
This commit is contained in:
parent
c45ea96eb3
commit
10b178c8ee
|
@ -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'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue