Re: [Django] #15067: base36_to_int returns a long in certain situations

2011-01-24 Thread Django
#15067: base36_to_int returns a long in certain situations
-+--
  Reporter:  Garthex | Owner:  nobody 
Status:  new | Milestone:  1.3
 Component:  Core framework  |   Version:  1.2
Resolution:  |  Keywords:  blocker
 Stage:  Accepted| Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Comment (by russellm):

 Fair point about 32 bit systems; in which case, a check should be
 performed against sys.maxint. That enables us to make the contract for
 base36_to_int into "always returns an int", which makes a certain amount
 of sense anyway.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15067: base36_to_int returns a long in certain situations

2011-01-22 Thread Django
#15067: base36_to_int returns a long in certain situations
-+--
  Reporter:  Garthex | Owner:  nobody 
Status:  new | Milestone:  1.3
 Component:  Core framework  |   Version:  1.2
Resolution:  |  Keywords:  blocker
 Stage:  Accepted| Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by jboutros):

  * needs_tests:  1 => 0

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15067: base36_to_int returns a long in certain situations

2011-01-22 Thread Django
#15067: base36_to_int returns a long in certain situations
-+--
  Reporter:  Garthex | Owner:  nobody 
Status:  new | Milestone:  1.3
 Component:  Core framework  |   Version:  1.2
Resolution:  |  Keywords:  blocker
 Stage:  Accepted| Has_patch:  1  
Needs_docs:  0   |   Needs_tests:  1  
Needs_better_patch:  0   |  
-+--
Changes (by kfrazier):

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

Comment:

 Limiting it to 12 characters would ensure that the return value is an int,
 but for 32-bit systems, it is far too large. For 32-bit systems, it would
 need to be limited to 5 characters. We discussed changes to throw a
 ValueError from base36_to_int if the value is greater than sys.maxint, but
 that would potentially break a lot of user systems that may be happily
 using longs without issue. The safest approach seems to be to just catch
 the OverflowError in password_reset_confirm and set user to None if it
 occurs. Patch is attached.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15067: base36_to_int returns a long in certain situations

2011-01-21 Thread Django
#15067: base36_to_int returns a long in certain situations
-+--
  Reporter:  Garthex | Owner:  nobody 
Status:  new | Milestone:  1.3
 Component:  Core framework  |   Version:  1.2
Resolution:  |  Keywords:  blocker
 Stage:  Accepted| Has_patch:  0  
Needs_docs:  0   |   Needs_tests:  0  
Needs_better_patch:  0   |  
-+--
Changes (by ramiro):

  * keywords:  => blocker
  * milestone:  => 1.3

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15067: base36_to_int returns a long in certain situations

2011-01-14 Thread Django
#15067: base36_to_int returns a long in certain situations
-+--
  Reporter:  Garthex | Owner:  nobody
Status:  new | Milestone:
 Component:  Core framework  |   Version:  1.2   
Resolution:  |  Keywords:
 Stage:  Accepted| Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by russellm):

  * stage:  Unreviewed => Accepted

Comment:

 I suspect the answer here will be to only allow 12 digits instead of 13.
 That will allow integers up to 4738381338321616895 instead of
 9223372036854775807, but (ahem) that should be enough for anybody.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #15067: base36_to_int returns a long in certain situations

2011-01-13 Thread Django
#15067: base36_to_int returns a long in certain situations
-+--
  Reporter:  Garthex | Owner:  nobody
Status:  new | Milestone:
 Component:  Core framework  |   Version:  1.2   
Resolution:  |  Keywords:
 Stage:  Unreviewed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by Garthex):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 {{{
 $ python --version
 Python 2.7.1
 }}}

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



[Django] #15067: base36_to_int returns a long in certain situations

2011-01-12 Thread Django
#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('z', 36))
 
 }}}

 This causes an {{{OverflowError}}} with
 {{{django.contrib.auth.views.password_reset_done}}} if you supply
 {{{uidb36='z'}}} 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: 
Django 
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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.