diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-28 03:59:31 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-28 03:59:31 +0100 |
commit | 5aced008ee1e86efae8f3b42d6877164ff70a929 (patch) | |
tree | 70902b5b6d6710901bc27d86e37d5324ae2594e5 | |
parent | a86de6104de901746992d9a9e55ad74c93c1ec6f (diff) | |
download | prosody-5aced008ee1e86efae8f3b42d6877164ff70a929.tar.gz prosody-5aced008ee1e86efae8f3b42d6877164ff70a929.zip |
mod_auth_internal_hashed: Remove COMPAT code (upgrading old hashed storage format from pre-0.8)
-rw-r--r-- | plugins/mod_auth_internal_hashed.lua | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua index 65cc8143..607ecab4 100644 --- a/plugins/mod_auth_internal_hashed.lua +++ b/plugins/mod_auth_internal_hashed.lua @@ -15,10 +15,6 @@ local generate_uuid = require "util.uuid".generate; local new_sasl = require "util.sasl".new; local nodeprep = require "util.encodings".stringprep.nodeprep; --- COMPAT w/old trunk: remove these two lines before 0.8 release -local hmac_sha1 = require "util.hmac".sha1; -local sha1 = require "util.hashes".sha1; - local to_hex; do local function replace_byte_with_hex(byte) @@ -66,16 +62,6 @@ function new_hashpass_provider(host) return nil, "Auth failed. Stored salt and iteration count information is not complete."; end - -- convert hexpass to stored_key and server_key - -- COMPAT w/old trunk: remove before 0.8 release - if credentials.hashpass then - local salted_password = from_hex(credentials.hashpass); - credentials.stored_key = sha1(hmac_sha1(salted_password, "Client Key"), true); - credentials.server_key = to_hex(hmac_sha1(salted_password, "Server Key")); - credentials.hashpass = nil - datamanager.store(username, host, "accounts", credentials); - end - local valid, stored_key, server_key = getAuthenticationDatabaseSHA1(password, credentials.salt, credentials.iteration_count); local stored_key_hex = to_hex(stored_key); @@ -149,16 +135,6 @@ function new_hashpass_provider(host) if not credentials then return; end end - -- convert hexpass to stored_key and server_key - -- COMPAT w/old trunk: remove before 0.8 release - if credentials.hashpass then - local salted_password = from_hex(credentials.hashpass); - credentials.stored_key = sha1(hmac_sha1(salted_password, "Client Key"), true); - credentials.server_key = to_hex(hmac_sha1(salted_password, "Server Key")); - credentials.hashpass = nil - datamanager.store(username, host, "accounts", credentials); - end - local stored_key, server_key, iteration_count, salt = credentials.stored_key, credentials.server_key, credentials.iteration_count, credentials.salt; stored_key = stored_key and from_hex(stored_key); server_key = server_key and from_hex(server_key); |