Software /
code /
prosody
Changeset
3216:d4d0519cd0c1
mod_auth_internal_hashed: Removed some useless code.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Wed, 09 Jun 2010 22:01:47 +0500 (2010-06-09) |
parents | 3215:e55782f20679 |
children | 3217:382f70627ff9 |
files | plugins/mod_auth_internal_hashed.lua |
diffstat | 1 files changed, 0 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_auth_internal_hashed.lua Wed Jun 09 22:00:01 2010 +0500 +++ b/plugins/mod_auth_internal_hashed.lua Wed Jun 09 22:01:47 2010 +0500 @@ -57,12 +57,9 @@ return nil, "Auth failed. Stored salt and iteration count information is not complete."; end - local valid, stored_key, server_key - -- convert hexpass to stored_key and server_key -- TODO: remove this in near future if credentials.hashpass then - valid = true; local salted_password = credentials.hashpass:gsub("..", function(x) return string.char(tonumber(x, 16)); end); credentials.stored_key = sha1(hmac_sha1(salted_password, "Client Key")):gsub(".", function (c) return ("%02x"):format(c:byte()); end); credentials.server_key = hmac_sha1(salted_password, "Server Key"):gsub(".", function (c) return ("%02x"):format(c:byte()); end);