The function below returns whatever URL the caller passes in, unchanged — the exact value a login page might feed straight into a redirect response.
The bug: an attacker can craft a link like https://codejump.io/login?next=https://evil.com and, after a successful login, the victim gets redirected to a phishing site that looks just like yours.
Your task: fix solve(redirect_url) so that:
javascript: URL, or a protocol-relative URL starting with // (a common bypass, since browsers treat it as same-protocol-different-host) — falls back to '/'.solve('/dashboard') # → '/dashboard'
solve('https://evil.com') # → '/'
solve('//evil.com') # → '/' (protocol-relative bypass)
solve('javascript:alert(1)') # → '/'Sample tests