Ram Rachum <r...@rachum.com> added the comment:

> To me, this seems like a pretty thin justification for calling this a 
> security vulnerability.

I know that lots of exploits were made because of bugs in Python's URL parsing, 
and security releases of Python were made because of that. It's possible that 
similar exploits could be done for bugs in parsing datetimes. It's different, 
and it's a thin justification, I agree, so if it's treated as a non-security 
bug, I'm okay with that. 


> ISO 8601 specifies dozens of ways to represent the same datetime

Yes, but not within the same format. If someone were to choose the format 
'2014-04-10T24:00:00', they would have a reasonable expectation that there is 
only one unique string that corresponds with that datetime.

> As far as the inconsistency, I think that's an argument for being less 
> strict, not more, and allowing non-ASCII digits in more places not just the 
> first. Why shouldn't (let's say) a Bengali user specify the day of the month 
> using Bengali digits?

That's an interesting direction. It might be a good thing to allow users in 
different locales to specify datetime with their native digits. But, if we were 
to go in that direction, we would have to: 

1. Define that use case more rigorously, consider whether it has any effects we 
need to consider, like clashes with how the local culture expresses dates. 
Maybe we accept the year 2020 in Elbonian digits, but the Elbonian people count 
their years from the birth of Saint Elbon, and for them the year 2020 in 
Elbonian digits means -1553 BC for us?
2. Enable it in other fields except year.
3. Add tests for it. 

Since we're not going to do that ever, I don't think there's a point in leaving 
a 10% implementation of non-Ascii datetime parsing.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39280>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to