Prevents an invalid redirect from being performed via a malformed request.