PHP-017 / Beginner
Open redirect (redirect($request->input('next')))
Why is this a problem?
Users can be sent to phishing pages.
How to fix it
php
$next = $request->input('next');
return redirect()->intended('/home'); // Alternatively allow only internal paths
// Check: only when parse_url($next, PHP_URL_HOST) is null and the value starts with '/'