changeset 2436:c8a3a74953f6

remove bogus {SHA} check from changepass
author Johannes Berg <johannes AT sipsolutions DOT net>
date Fri, 20 Jul 2007 10:17:29 +0200
parents 5742ec1cbb37
children 0b2a95feb672 572f8ce1adff
files MoinMoin/userprefs/changepass.py
diffstat 1 files changed, 7 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/userprefs/changepass.py	Fri Jul 20 10:06:35 2007 +0200
+++ b/MoinMoin/userprefs/changepass.py	Fri Jul 20 10:17:29 2007 +0200
@@ -57,15 +57,13 @@
             if pw_error:
                 return _("Password not acceptable: %s") % pw_error
 
-        # Encode password
-        if password and not password.startswith('{SHA}'):
-            try:
-                self.request.user.enc_password = user.encodePassword(password)
-                self.request.user.save()
-                return _("Your password has been changed.")
-            except UnicodeError, err:
-                # Should never happen
-                return "Can't encode password: %s" % str(err)
+        try:
+            self.request.user.enc_password = user.encodePassword(password)
+            self.request.user.save()
+            return _("Your password has been changed.")
+        except UnicodeError, err:
+            # Should never happen
+            return "Can't encode password: %s" % str(err)
 
 
     def create_form(self, create_only=False, recover_only=False):