liquid_feedback_frontend
changeset 906:a2c5707035ea
More robust call of extos.crypt
author | bsw |
---|---|
date | Sun Sep 23 16:31:32 2012 +0200 (2012-09-23) |
parents | e3887fea39fa |
children | 319161d5a904 |
files | model/member.lua |
line diff
1.1 --- a/model/member.lua Sun Sep 23 14:35:20 2012 +0200 1.2 +++ b/model/member.lua Sun Sep 23 16:31:32 2012 +0200 1.3 @@ -298,14 +298,13 @@ 1.4 error("Unknown hash algorithm selected in configuration") 1.5 1.6 end 1.7 + 1.8 + hash_prefix = hash_prefix .. multirand.string( 1.9 + salt_length, 1.10 + "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./" 1.11 + ) 1.12 1.13 - local hash = extos.crypt( 1.14 - password, 1.15 - hash_prefix .. multirand.string( 1.16 - salt_length, 1.17 - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./" 1.18 - ) 1.19 - ) 1.20 + local hash = extos.crypt(password, hash_prefix) 1.21 1.22 if not hash or hash:sub(1, #hash_prefix) ~= hash_prefix then 1.23 error("Password hashing algorithm failed")