[SQLObject] Possible bug in EnumCol/EnumValidator
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Gert B. <ger...@gm...> - 2013-08-07 09:52:28
|
Hi Attached is a test case demonstrating the issue. Tested with version 1.5.0b1 and some previous versions. The EnumValidator checks if the value given is in the list of valid enumValues but this allows unicode values to match normal string values. That allows unicode objects into the SQL generation code which forces python to create unicode strings instead of normal strings. This means already encoded values will be decoded again and probably with the wrong encoding. My guess is that the EnumValidator should return only str objects that are properly encoded. Regards Gert Burger |