Re: [Django] #35477: Required field error added to new_password1 on forms that inherit SetPasswordForm with additional new_password1 level validation.

35 views
Skip to first unread message

Django

unread,
May 24, 2024, 5:38:22 AM5/24/24
to django-...@googlegroups.com
#35477: Required field error added to new_password1 on forms that inherit
SetPasswordForm with additional new_password1 level validation.
---------------------------------+------------------------------------
Reporter: אורי | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Comment (by Sarah Boyce):

Thank you for testing 5.1 and raising the ticket אורי 👍
--
Ticket URL: <https://code.djangoproject.com/ticket/35477#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 24, 2024, 5:47:32 AM5/24/24
to django-...@googlegroups.com
#35477: Required field error added to new_password1 on forms that inherit
SetPasswordForm with additional new_password1 level validation.
---------------------------------+----------------------------------------
Reporter: אורי | Owner: Fabian Braun
Type: Bug | Status: assigned
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Fabian Braun):

* owner: nobody => Fabian Braun
* status: new => assigned

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

Django

unread,
May 24, 2024, 6:19:19 AM5/24/24
to django-...@googlegroups.com
#35477: Required field error added to new_password1 on forms that inherit
SetPasswordForm with additional new_password1 level validation.
---------------------------------+----------------------------------------
Reporter: אורי | Owner: Fabian Braun
Type: Bug | Status: assigned
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Fabian Braun):

* has_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35477#comment:6>

Django

unread,
May 24, 2024, 7:58:01 AM5/24/24
to django-...@googlegroups.com
#35477: Required field error added to new_password1 on forms that inherit
SetPasswordForm with additional new_password1 level validation.
---------------------------------+----------------------------------------
Reporter: אורי | Owner: Fabian Braun
Type: Bug | Status: assigned
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Natalia Bidart):

* needs_tests: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35477#comment:7>

Django

unread,
May 24, 2024, 9:23:40 AM5/24/24
to django-...@googlegroups.com
#35477: Required field error added to new_password1 on forms that inherit
SetPasswordForm with additional new_password1 level validation.
---------------------------------+----------------------------------------
Reporter: אורי | Owner: Fabian Braun
Type: Bug | Status: assigned
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Fabian Braun):

* needs_tests: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/35477#comment:8>

Django

unread,
May 24, 2024, 11:38:14 AM5/24/24
to django-...@googlegroups.com
#35477: Required field error added to new_password1 on forms that inherit
SetPasswordForm with additional new_password1 level validation.
---------------------------------+----------------------------------------
Reporter: אורי | Owner: Fabian Braun
Type: Bug | Status: assigned
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Comment (by אורי):

Replying to [comment:2 Sarah Boyce]:
> Hi אורי, I spent quite a while with this. Next time please share links
to your tests or code in the ticket.

Sorry about that. Code is under https://github.com/speedy-net/speedy-net.
Tests are in relevant test files. Recent tests I ran are under
https://github.com/speedy-net/speedy-net/actions.

The tests I mentioned in this ticket
(`speedy.core.accounts.tests.test_views.EditProfileCredentialsViewEnglishTestCase`)
are under https://github.com/speedy-net/speedy-
net/blob/main/speedy/core/accounts/tests/test_views.py. Notice that there
are also tests for French, German and other languages.
--
Ticket URL: <https://code.djangoproject.com/ticket/35477#comment:9>

Django

unread,
May 27, 2024, 12:13:41 PM5/27/24
to django-...@googlegroups.com
#35477: Required field error added to new_password1 on forms that inherit
SetPasswordForm with additional new_password1 level validation.
---------------------------------+----------------------------------------
Reporter: אורי | Owner: Fabian Braun
Type: Bug | Status: assigned
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Natalia Bidart):

* needs_better_patch: 0 => 1
* needs_tests: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/35477#comment:10>

Django

unread,
May 30, 2024, 2:29:27 PM5/30/24
to django-...@googlegroups.com
#35477: Required field error added to new_password1 on forms that inherit
SetPasswordForm with additional new_password1 level validation.
-------------------------------------+-------------------------------------
Reporter: אורי | Owner: Fabian
| Braun
Type: Bug | Status: assigned
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/35477#comment:11>

Django

unread,
May 30, 2024, 3:31:18 PM5/30/24
to django-...@googlegroups.com
#35477: Required field error added to new_password1 on forms that inherit
SetPasswordForm with additional new_password1 level validation.
-------------------------------------+-------------------------------------
Reporter: אורי | Owner: Fabian
| Braun
Type: Bug | Status: closed
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by nessita <124304+nessita@…>):

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

Comment:

In [changeset:"339977d4441fd353e20950b98bad3d42afb1f126" 339977d4]:
{{{#!CommitTicketReference repository=""
revision="339977d4441fd353e20950b98bad3d42afb1f126"
Fixed #35477 -- Corrected 'required' errors in auth password set/change
forms.

The auth forms using SetPasswordMixin were incorrectly including the
'This field is required.' error when additional validations (e.g.,
overriding `clean_password1`) were performed and failed.
This fix ensures accurate error reporting for password fields.

Co-authored-by: Natalia <124304+...@users.noreply.github.com>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35477#comment:12>

Django

unread,
May 30, 2024, 3:32:43 PM5/30/24
to django-...@googlegroups.com
#35477: Required field error added to new_password1 on forms that inherit
SetPasswordForm with additional new_password1 level validation.
-------------------------------------+-------------------------------------
Reporter: אורי | Owner: Fabian
| Braun
Type: Bug | Status: closed
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Natalia <124304+nessita@…>):

In [changeset:"9996bb1eadc108d228a20d928bccae84afd338d6" 9996bb1e]:
{{{#!CommitTicketReference repository=""
revision="9996bb1eadc108d228a20d928bccae84afd338d6"
[5.1.x] Fixed #35477 -- Corrected 'required' errors in auth password
set/change forms.

The auth forms using SetPasswordMixin were incorrectly including the
'This field is required.' error when additional validations (e.g.,
overriding `clean_password1`) were performed and failed.
This fix ensures accurate error reporting for password fields.

Co-authored-by: Natalia <124304+...@users.noreply.github.com>

Backport of 339977d4441fd353e20950b98bad3d42afb1f126 from main.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35477#comment:13>
Reply all
Reply to author
Forward
0 new messages