#34656 closed Bug (fixed)

Wrong HTML generation in Django admin's change_password form

Reported by: Yaser Amiri Owned by: Yaser Amiri
Component: contrib.admin Version: 4.2
Severity: Normal Keywords:
Cc: David Smith Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description

Context: contrib.admin package

In auth/user/change_password.html there is a condition that checks existence of id_for_label for password1 field, the {% endif %} is closed in the wrong position and if the condition return False, the HTML will be corrupted (I'm not sure if it's possible to make the condition falsy)

Link: https://github.com/django/django/blob/549d6ffeb6d626b023acc40c3bb2093b4b25b3d6/django/contrib/admin/templates/admin/auth/user/change_password.html#L37

Change History (5)

comment:1 by Mariusz Felisiak, 11 months ago

Cc: David Smith added
Easy pickings: set
Triage Stage: UnreviewedAccepted

Thanks for the report. Regression in 6991880109e35c879b71b7d9d9c154baeec12b89.

Would you like to prepare a patch?

comment:2 by Yaser Amiri, 11 months ago

Owner: changed from myself to Yaser Amiri

comment:3 by Mariusz Felisiak, 11 months ago

Has patch: set
Needs tests: set

comment:4 by Mariusz Felisiak, 11 months ago

Needs tests: unset
Triage Stage: AcceptedReady for checkin

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 11 months ago

Resolution: fixed
Status: assignedclosed

In 3f1bc222:

Fixed #34656 -- Fixed unclosed div in admin password change template.

Regression in 6991880109e35c879b71b7d9d9c154baeec12b89.

Note: See TracTickets for help on using tickets.
Back to Top