Skip to content

Commit aa7792a

Browse files
bmispelonSaptakS
authored andcommitted
Only sent next parameter to login view if not empty
Setting it to "/" by default makes settings.LOGIN_REDIRECT_URL useless, and makes the profile edit page harder to discover.
1 parent 1c67227 commit aa7792a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

djangoproject/templates/registration/login.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ <h1>{% translate "Log in" %}</h1>
1515

1616
<form method="post" action="" class="form-input">
1717
{% csrf_token %}
18-
<input type="hidden" name="next" value="{{ next|default:"/" }}">
18+
{% if next %}
19+
<input type="hidden" name="next" value="{{ next }}">
20+
{% endif %}
1921

2022
<div>
2123
<label for="id_username">{% translate "Username:" %}</label>

0 commit comments

Comments
 (0)