Opened 12 years ago
Closed 12 years ago
#18982 closed Bug (fixed)
DateField.clean raises TypeError when passed NUL bytes. Should be ValidationError.
Description ¶
When a DateField (or any BaseTemporalField) tries to clean a value with a NUL byte (like 'a\x00b'
), the call to strptime()
raises an uncaught TypeError. It should raise a ValidationError instead, because 'a\x00b'
is not a valid date.
I have a patch for this, pull request to come.
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Owner: | changed from | to
---|
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Pull request: https://github.com/django/django/pull/380