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:
parent
c45ea96eb3
commit
10b178c8ee
1 changed files with 2 additions and 0 deletions
|
@ -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