[ANNOUNCE] Django security releases issued (1.4.21, 1.7.9, and 1.8.3)
102 views
Skip to first unread message
Tim Graham
unread,
Jul 8, 2015, 4:11:26 PM7/8/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-...@googlegroups.com, django-d...@googlegroups.com, django...@googlegroups.com, oss-se...@lists.openwall.com
Today the Django team issued multiple releases -- Django 1.4.21, 1.7.9, and 1.8.3 -- as part of our security process.
These releases address a couple security issues, and we encourage all users to upgrade as soon as possible.
As a reminder, we ask that potential security issues be reported via private email to secu...@djangoproject.com, and not via Django's Trac instance or the django-developers list. Please see https://www.djangoproject.com/security for further information.
tomv
unread,
Jul 10, 2015, 6:00:20 AM7/10/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-d...@googlegroups.com
Out of interest what's wrong with casting to int and checking for exceptions?
This is the removed code:
try:
int(value)
except (ValueError, TypeError):
raise ValidationError(_('Enter a valid integer.'), code='invalid')
Does this match different strings than the new regex: re.compile('^-?\d+\Z') ? Or is it more about performance, OverflowError etc?
Florian Apolloner
unread,
Jul 10, 2015, 6:32:50 AM7/10/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-d...@googlegroups.com
In [1]: int(' 5 ') Out[1]: 5
Cheers, Florian
Łukasz Rekucki
unread,
Jul 10, 2015, 6:35:36 AM7/10/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-developers
Tom's question got me thinking. Should non-ASCII numerals be allowed ?
import re
for x in ("10", "६"):
print("INT", int(x))
print("RE", re.match("^-?\d+\Z", x) is not None)
On Python 3 this returns True and True unless you add re.ASCII flag.