Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #1070 -- Improved date validation to limit it to dates 1900 and…

… up.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2134 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e15567bf58aa3331099eaefad6464aa38fdf6f20 1 parent 1dc65cb
Adrian Holovaty authored January 27, 2006

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/core/validators.py
2  django/core/validators.py
@@ -10,7 +10,7 @@
10 10
 
11 11
 import re
12 12
 
13  
-_datere = r'\d{4}-((?:0?[1-9])|(?:1[0-2]))-((?:0?[1-9])|(?:[12][0-9])|(?:3[0-1]))'
  13
+_datere = r'(19|2\d)\d{2}-((?:0?[1-9])|(?:1[0-2]))-((?:0?[1-9])|(?:[12][0-9])|(?:3[0-1]))'
14 14
 _timere = r'(?:[01]?[0-9]|2[0-3]):[0-5][0-9](?::[0-5][0-9])?'
15 15
 alnum_re = re.compile(r'^\w+$')
16 16
 alnumurl_re = re.compile(r'^[\w/]+$')

0 notes on commit e15567b

Please sign in to comment.
Something went wrong with that request. Please try again.