Passwords need to be considered as binary fields stable
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Mon, 14 Dec 2009 14:58:41 +0100
branchstable
changeset 4114 a75a6e770717
parent 4113 986fc01be83c
child 4115 6ec0fca70701
Passwords need to be considered as binary fields
server/sources/rql2sql.py
--- a/server/sources/rql2sql.py	Mon Dec 14 14:57:10 2009 +0100
+++ b/server/sources/rql2sql.py	Mon Dec 14 14:58:41 2009 +0100
@@ -995,7 +995,9 @@
             return self.keyword_map[value]()
         if constant.type == 'Boolean':
             value = self.dbms_helper.boolean_value(value)
-        if constant.type == 'Substitute':
+        elif constant.type == 'Password' or constant.type == 'Bytes':
+            value = self.dbms_helper.binary_value(value)
+        elif constant.type == 'Substitute':
             _id = constant.value
             if isinstance(_id, unicode):
                 _id = _id.encode()