{"action":"opened","issue":{"url":"https://api.github.com/repos/django/djangoproject.com/issues/695","repository_url":"https://api.github.com/repos/django/djangoproject.com","labels_url":"https://api.github.com/repos/django/djangoproject.com/issues/695/labels{/name}","comments_url":"https://api.github.com/repos/django/djangoproject.com/issues/695/comments","events_url":"https://api.github.com/repos/django/djangoproject.com/issues/695/events","html_url":"https://github.com/django/djangoproject.com/issues/695","id":173216297,"number":695,"title":"redirect invalid next is not define to '/accounts/profile'","user":{"login":"RaminFP","id":10054759,"avatar_url":"https://avatars.githubusercontent.com/u/10054759?v=3","gravatar_id":"","url":"https://api.github.com/users/RaminFP","html_url":"https://github.com/RaminFP","followers_url":"https://api.github.com/users/RaminFP/followers","following_url":"https://api.github.com/users/RaminFP/following{/other_user}","gists_url":"https://api.github.com/users/RaminFP/gists{/gist_id}","starred_url":"https://api.github.com/users/RaminFP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaminFP/subscriptions","organizations_url":"https://api.github.com/users/RaminFP/orgs","repos_url":"https://api.github.com/users/RaminFP/repos","events_url":"https://api.github.com/users/RaminFP/events{/privacy}","received_events_url":"https://api.github.com/users/RaminFP/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-25T14:19:52Z","updated_at":"2016-08-25T14:19:52Z","closed_at":null,"body":"Hi @timgraham,\r\n\r\nyou use app 'django-registration', on login page with this url https://www.djangoproject.com/accounts/login/?next=/accounts/edit/ we can redirect to valid url path \"/accounts/edit/\" but if we use https://www.djangoproject.com/accounts/login/?next=//google.com we will redirect to page 'accounts/profile' this page not found,\r\n\r\nwe should use like this : \r\n```python\r\nif redirect_to:\r\n    define_root_path = '/'\r\n    redirect_to = redirect_to if is_safe_url(redirect_to,request.get_host()) else define_root_path \r\n``` \r\n\r\nThanks,\r\n"}}
{"actor":{"display_login":"RaminFP"}}