diff --git a/django/contrib/auth/views.py b/django/contrib/auth/views.py
index 8d0453f..c34a4a3 100644
|
a
|
b
|
def login(request, template_name='registration/login.html',
|
| 34 | 34 | if form.is_valid(): |
| 35 | 35 | netloc = urlparse.urlparse(redirect_to)[1] |
| 36 | 36 | |
| 37 | | # Light security check -- make sure redirect_to isn't garbage. |
| 38 | | if not redirect_to or ' ' in redirect_to: |
| | 37 | # Use default setting if redirect_to is empty |
| | 38 | if not redirect_to: |
| 39 | 39 | redirect_to = settings.LOGIN_REDIRECT_URL |
| 40 | 40 | |
| 41 | | # Heavier security check -- don't allow redirection to a different |
| | 41 | # Security check -- don't allow redirection to a different |
| 42 | 42 | # host. |
| 43 | 43 | elif netloc and netloc != request.get_host(): |
| 44 | 44 | redirect_to = settings.LOGIN_REDIRECT_URL |