#15067: base36_to_int returns a long in certain situations
----------------------------+-----------------------------------------------
Reporter: Garthex | Owner: nobody
Status: new | Milestone:
Component: Core framework | Version: 1.2
Keywords: | Stage: Unreviewed
Has_patch: 0 |
----------------------------+-----------------------------------------------
{{{django.utils.http.base36_to_int}}} uses the {{{int()}}} cast, which
returns a {{{long}}} if it can't fit within an {{{int}}}. The input is
truncated to 13 characters before calling {{{int()}}}, but if you supply
13 Z's you receive a {{{long}}} instead of an {{{int}}}.
{{{
>>> type(int('zzzzzzzzzzzzz', 36))
<type 'long'>
}}}
This causes an {{{OverflowError}}} with
{{{django.contrib.auth.views.password_reset_done}}} if you supply
{{{uidb36='zzzzzzzzzzzzz'}}} and {{{token='123'}}}
Note: testing of the {{{password_reset_done}}} was done on version 1.2.3
and testing of {{{base36_to_int}}} was done on 1.2.3 and the trunk.
--
Ticket URL: <http://code.djangoproject.com/ticket/15067>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.