diff roundup/backends/rdbms_common.py @ 4480:1613754d2646

Fix first part of Password handling security issue2550688 (thanks Joseph Myers for reporting and Eli Collins for fixing) Small change against original patch: We still accept plaintext passwords (in known_schemes) when parsing encrypted password (e.g. from database). This way existing databases with plaintext passwords continue to work (I don't know of any, this would need patching on the users side) and all regression tests pass.
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Thu, 14 Apr 2011 12:24:59 +0000
parents 143f52d48e60
children 22bc0426e348
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py	Thu Apr 14 09:21:23 2011 +0000
+++ b/roundup/backends/rdbms_common.py	Thu Apr 14 12:24:59 2011 +0000
@@ -2832,9 +2832,7 @@
             elif isinstance(prop, hyperdb.Interval):
                 value = date.Interval(value)
             elif isinstance(prop, hyperdb.Password):
-                pwd = password.Password()
-                pwd.unpack(value)
-                value = pwd
+                value = password.Password(encrypted=value)
             elif isinstance(prop, String):
                 if isinstance(value, unicode):
                     value = value.encode('utf8')

Roundup Issue Tracker: http://roundup-tracker.org/