--
Ticket URL: <https://code.djangoproject.com/ticket/26719>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_docs: => 0
* needs_better_patch: => 0
* type: Uncategorized => Bug
* needs_tests: => 0
* stage: Unreviewed => Accepted
Comment:
Same for `normalize_username` in 1.10. What about applying the
normalization in an `AbstractUser.clean()` method?
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:1>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/6788 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:2>
* needs_better_patch: 0 => 1
* version: 1.9 => 1.10
* severity: Normal => Release blocker
Comment:
Promoting to release blocker in light of Claude's concern of the lack of
`normalize_username` as a possible security issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:3>
Comment (by mitar):
Can you elaborate on the security concern?
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:4>
Comment (by claudep):
The security concern is about unicode username not being normalized, which
could allow a user to create a new account with a visually similar
username as another one.
You can also find more information on this
[https://groups.google.com/forum/#!topic/django-developers/MBSWXcQBP3k
django-developers thread].
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:5>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:6>
* needs_better_patch: 0 => 1
* severity: Release blocker => Normal
* stage: Ready for checkin => Accepted
Comment:
I wrote [https://github.com/django/django/pull/6819 a separate patch] for
moving `username` normalization to `AbstractBaseUser.clean()`. I'll
refocus this ticket to moving `email` normalization since this isn't a
blocker for 1.10.
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:7>
Comment (by Tim Graham <timograham@…>):
In [changeset:"39805686b364358af725b695924a5a6dfa7f5302" 39805686]:
{{{
#!CommitTicketReference repository=""
revision="39805686b364358af725b695924a5a6dfa7f5302"
Refs #21379, #26719 -- Moved username normalization to AbstractBaseUser.
Thanks Huynh Thanh Tam for the initial patch and Claude Paroz for review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:8>
Comment (by Tim Graham <timograham@…>):
In [changeset:"1b0b6f0342e5ac9e3e789ca522ad64a532602c3f" 1b0b6f03]:
{{{
#!CommitTicketReference repository=""
revision="1b0b6f0342e5ac9e3e789ca522ad64a532602c3f"
[1.10.x] Refs #21379, #26719 -- Moved username normalization to
AbstractBaseUser.
Thanks Huynh Thanh Tam for the initial patch and Claude Paroz for review.
Backport of 39805686b364358af725b695924a5a6dfa7f5302 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:9>
Comment (by timgraham):
Not sure I understand the premise of the report because `UserCreationForm`
only has `fields = ("username",)` (no `email` field).
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:10>
* component: Forms => contrib.auth
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:11>
Comment (by mitar):
Yes, but you can extend it and add it to fields in Meta. It is a
ModelForm. So the list of fields exposed is just a default.
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:12>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:13>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"09119dff14ad24d53ac0273e5cd2de24de0b0d81" 09119dff]:
{{{
#!CommitTicketReference repository=""
revision="09119dff14ad24d53ac0273e5cd2de24de0b0d81"
Fixed #26719 -- Normalized email in AbstractUser.clean().
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26719#comment:14>