Django security releases issued: 3.0.1, 2.2.9, and 1.11.27

95 views
Skip to first unread message

Mariusz Felisiak

unread,
Dec 18, 2019, 4:23:35 AM12/18/19
to django-d...@googlegroups.com, django-...@googlegroups.com, django...@googlegroups.com
Details are available on the Django project weblog:

https://www.djangoproject.com/weblog/2019/dec/18/security-releases/

Sam Willis

unread,
Dec 18, 2019, 5:23:58 AM12/18/19
to Django developers (Contributions to Django itself)
Hi,

It looks to me like this has introduced a slight behaviour difference with 1.11 on python 2.7 than on 3.x:


The release notes don't indicate what the difference in behaviour is between python 2 and 3.

I'm trying to follow the change and test cases but it looks like if you have two users 'mi...@example.org' and 'mık...@example.org' (which is highly unlikely anyway to happen legitimately) neither can reset their password anymore on py2?


I'm guessing this was found after the similar GitHub vulnerability was found?

Thanks for the hard work!

Markus Holtermann

unread,
Dec 18, 2019, 6:00:37 AM12/18/19
to Django developers
Thanks for checking and asking!

On Python 2, the email address with "i without dot" isn't a valid email address according to the EmailValidator and thus shouldn't be in your database in the first place.

Cheers,

/Markus
> --
> You received this message because you are subscribed to the Google
> Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-develop...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/5cde448c-7631-472f-857f-168bd872fe3e%40googlegroups.com <https://groups.google.com/d/msgid/django-developers/5cde448c-7631-472f-857f-168bd872fe3e%40googlegroups.com?utm_medium=email&utm_source=footer>.

Dirk Groten

unread,
Dec 18, 2019, 8:09:52 AM12/18/19
to Django developers (Contributions to Django itself)
I've been looking in more detail into this issue, as some other Django packages are affected also by this issue. Now, when I run the tests that are provided with this fix using SQLite, the issue does not occur, whereas it does happen for PostgreSQL (I haven't tested for MySQL). Is it correct that in Postgres, `User.objects.filter(email__iexact='mık...@example.org')` will match a user with email "mi...@example.org" but SQLite won't find a match? And if so, why is that? Is it dependent on specific Postgres settings?

Carlton Gibson

unread,
Dec 18, 2019, 8:21:35 AM12/18/19
to Django developers (Contributions to Django itself)
HI Dirk. 

You're correct, the issue doesn't appear to arise on SQLite. Pass on exactly why right now. Maybe there's some PostgreSQL setting that might avoid it but, in general, it's not dependent on specific PostgreSQL settings. 

Kind Regards,

Carlton

Mariusz Felisiak

unread,
Dec 18, 2019, 8:22:06 AM12/18/19
to Django developers (Contributions to Django itself)

SQLite's only does an exact match, so it's not affected by Unicode Case Mapping Collisions.

Hanne Moa

unread,
Dec 18, 2019, 8:22:43 AM12/18/19
to django-d...@googlegroups.com
This depends on the collation that is used
<https://en.wikipedia.org/wiki/Unicode_collation_algorithm>. On a
system sorting everything as if it was Turkish, "ı" and "i" would be
considered two different letters, but I guess everywhere else they
would be merged into "i".
> --
> You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7ebbc544-c113-478b-9417-7f714fef783e%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages