diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2010-12-23 03:47:58 +0000 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2010-12-23 03:47:58 +0000 |
| commit | 7f8dd9cbac074389af8d8fd235bf2cb657227b9a (patch) | |
| tree | 80125b7e991a766f752c5b848bd6e77d0c0f1963 /django/utils/http.py | |
| parent | 17084839fd7e267da5729f2a27753322b9d415a0 (diff) | |
[1.1.X] Fix a security issue in the auth system. Disclosure and new release forthcoming.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@15036 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/http.py')
| -rw-r--r-- | django/utils/http.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/django/utils/http.py b/django/utils/http.py index f0b1af9c58..2fb60078e5 100644 --- a/django/utils/http.py +++ b/django/utils/http.py @@ -73,8 +73,13 @@ def http_date(epoch_seconds=None): def base36_to_int(s): """ - Convertd a base 36 string to an integer + Converts a base 36 string to an ``int``. To prevent + overconsumption of server resources, raises ``ValueError` if the + input is longer than 13 base36 digits (13 digits is sufficient to + base36-encode any 64-bit integer). """ + if len(s) > 13: + raise ValueError("Base36 input too large") return int(s, 36) def int_to_base36(i): |
