summaryrefslogtreecommitdiff
path: root/django/contrib
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2011-01-24 08:02:40 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2011-01-24 08:02:40 +0000
commitd053624aa8534c984e07d4d8d2ee867de013e2ec (patch)
tree9a9c4b52f913ddf2f16ce7cf63952b6ed0726393 /django/contrib
parent10b2441381592a17beb7c02725d8cb1fd62d6e0e (diff)
Fixed #15067 -- Modified the range checks on base36_to_int so you are guaranteed to always get an int, avoiding possible OverflowErrors. Thanks to Garthex for the report, jboutros for the patch, and kfrazier for the feedback.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15288 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib')
-rw-r--r--django/contrib/auth/tests/views.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/django/contrib/auth/tests/views.py b/django/contrib/auth/tests/views.py
index 014c8195fc..b4f93cefc3 100644
--- a/django/contrib/auth/tests/views.py
+++ b/django/contrib/auth/tests/views.py
@@ -104,6 +104,12 @@ class PasswordResetTest(AuthViewsTestCase):
self.assertEquals(response.status_code, 200)
self.assert_("The password reset link was invalid" in response.content)
+ def test_confirm_overflow_user(self):
+ # Ensure that we get a 200 response for a base36 user id that overflows int
+ response = self.client.get('/reset/zzzzzzzzzzzzz-1-1/')
+ self.assertEquals(response.status_code, 200)
+ self.assert_("The password reset link was invalid" in response.content)
+
def test_confirm_invalid_post(self):
# Same as test_confirm_invalid, but trying
# to do a POST instead.