aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-06-09 22:01:47 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-06-09 22:01:47 +0500
commitbb572575a3457cc63806cde3af95dba095222482 (patch)
tree0eb145f9aea6b2401305844ecd1b7da8f2928167
parentc7af4d8bf50f45b3b7bdd1450e1e8e87c62c8ca1 (diff)
downloadprosody-bb572575a3457cc63806cde3af95dba095222482.tar.gz
prosody-bb572575a3457cc63806cde3af95dba095222482.zip
mod_auth_internal_hashed: Removed some useless code.
-rw-r--r--plugins/mod_auth_internal_hashed.lua3
1 files changed, 0 insertions, 3 deletions
diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua
index 3007d565..84487cde 100644
--- a/plugins/mod_auth_internal_hashed.lua
+++ b/plugins/mod_auth_internal_hashed.lua
@@ -57,12 +57,9 @@ function new_hashpass_provider(host)
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);