# HG changeset patch # User bsw # Date 1348410692 -7200 # Node ID a2c5707035eaddfe60f7490dd38e00816fb15ea0 # Parent e3887fea39fa29f02c0fbc66be91bb47a5eda720 More robust call of extos.crypt diff -r e3887fea39fa -r a2c5707035ea model/member.lua --- a/model/member.lua Sun Sep 23 14:35:20 2012 +0200 +++ b/model/member.lua Sun Sep 23 16:31:32 2012 +0200 @@ -298,14 +298,13 @@ error("Unknown hash algorithm selected in configuration") end + + hash_prefix = hash_prefix .. multirand.string( + salt_length, + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./" + ) - local hash = extos.crypt( - password, - hash_prefix .. multirand.string( - salt_length, - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./" - ) - ) + local hash = extos.crypt(password, hash_prefix) if not hash or hash:sub(1, #hash_prefix) ~= hash_prefix then error("Password hashing algorithm failed")