Hi,

This fix affect 2.8 but I don't see how to backport it on 2.8 because in
some way, it changes the API (which is against the rules).
But on the other hands, the API is broken in 2.8.

Any ideas?

----- Forwarded message from Albert Cervera i Areny <[email protected]> -----

Date: Fri, 30 Aug 2013 07:48:34 +0200
From: Albert Cervera i Areny <[email protected]>
To: [email protected]
Subject: [tryton-commit] changeset in trytond: Fix crash in login with
        incorrect password...
Reply-To: [email protected]
X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.3

changeset 5236aa254801 in /home/hg/trytond
details: http://hg.tryton.org/trytond?cmd=changeset;node=5236aa254801
description:
        Fix crash in login with incorrect password by renaming delete to remove

        issue3346
        review1044002
diffstat:

 trytond/res/user.py |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r ec01d544372f -r 5236aa254801 trytond/res/user.py
--- a/trytond/res/user.py       Thu Aug 22 08:06:39 2013 +0200
+++ b/trytond/res/user.py       Fri Aug 30 07:46:45 2013 +0200
@@ -461,7 +461,7 @@
                 password = password.encode('utf-8')
             password_sha = hashlib.sha1(password).hexdigest()
             if password_sha == user_password:
-                LoginAttempt.delete(login)
+                LoginAttempt.remove(login)
                 return user_id
         LoginAttempt.add(login)
         return 0
@@ -497,7 +497,7 @@
         cls.create([{'login': login}])
 
     @classmethod
-    def delete(cls, login):
+    def remove(cls, login):
         cursor = Transaction().cursor
         cursor.execute('DELETE FROM "' + cls._table + '" WHERE "login" = %s',
             (login,))


----- End forwarded message -----

-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpRsDesf2ioF.pgp
Description: PGP signature

Reply via email to