[Django] #34656: Wrong HTML generation in Django admin's change_password form

12 views
Skip to first unread message

Django

unread,
Jun 16, 2023, 6:31:36 AM6/16/23
to django-...@googlegroups.com
#34656: Wrong HTML generation in Django admin's change_password form
-----------------------------------------+--------------------------
Reporter: Yaser Amiri | Owner: myself
Type: Bug | Status: assigned
Component: contrib.admin | Version: 4.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 1 |
-----------------------------------------+--------------------------
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]

--
Ticket URL: <https://code.djangoproject.com/ticket/34656>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 16, 2023, 6:39:14 AM6/16/23
to django-...@googlegroups.com
#34656: Wrong HTML generation in Django admin's change_password form
-------------------------------+------------------------------------

Reporter: Yaser Amiri | Owner: myself
Type: Bug | Status: assigned
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* cc: David Smith (added)
* easy: 0 => 1
* stage: Unreviewed => Accepted


Comment:

Thanks for the report. Regression in
6991880109e35c879b71b7d9d9c154baeec12b89.

Would you like to prepare a patch?

--
Ticket URL: <https://code.djangoproject.com/ticket/34656#comment:1>

Django

unread,
Jun 16, 2023, 6:50:14 AM6/16/23
to django-...@googlegroups.com
#34656: Wrong HTML generation in Django admin's change_password form
-------------------------------+---------------------------------------
Reporter: Yaser Amiri | Owner: Yaser Amiri

Type: Bug | Status: assigned
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------+---------------------------------------
Changes (by Yaser Amiri):

* owner: myself => Yaser Amiri


--
Ticket URL: <https://code.djangoproject.com/ticket/34656#comment:2>

Django

unread,
Jun 16, 2023, 6:55:28 AM6/16/23
to django-...@googlegroups.com
#34656: Wrong HTML generation in Django admin's change_password form
-------------------------------+---------------------------------------
Reporter: Yaser Amiri | Owner: Yaser Amiri
Type: Bug | Status: assigned
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 1
-------------------------------+---------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 0 => 1
* needs_tests: 0 => 1


Comment:

[https://github.com/django/django/pull/16982 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/34656#comment:3>

Django

unread,
Jun 19, 2023, 2:23:52 AM6/19/23
to django-...@googlegroups.com
#34656: Wrong HTML generation in Django admin's change_password form
-------------------------------------+-------------------------------------

Reporter: Yaser Amiri | Owner: Yaser
| Amiri
Type: Bug | Status: assigned
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_tests: 1 => 0
* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/34656#comment:4>

Django

unread,
Jun 19, 2023, 3:09:25 AM6/19/23
to django-...@googlegroups.com
#34656: Wrong HTML generation in Django admin's change_password form
-------------------------------------+-------------------------------------
Reporter: Yaser Amiri | Owner: Yaser
| Amiri
Type: Bug | Status: closed
Component: contrib.admin | Version: 4.2
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"3f1bc2222feeaeaeaa97ba221b7d6e41962162e7" 3f1bc222]:
{{{
#!CommitTicketReference repository=""
revision="3f1bc2222feeaeaeaa97ba221b7d6e41962162e7"
Fixed #34656 -- Fixed unclosed div in admin password change template.

Regression in 6991880109e35c879b71b7d9d9c154baeec12b89.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/34656#comment:5>

Reply all
Reply to author
Forward
0 new messages