Comparison

plugins/mod_auth_internal_hashed.lua @ 3204:7a15cbf23c5b

Fix missing parameter in mod_auth_internal_hashed.
author Kim Alvefur <zash@zash.se>
date Wed, 09 Jun 2010 03:41:24 +0200
parent 3189:d686abb6b069
child 3214:a69d8021b1db
comparison
equal deleted inserted replaced
3203:ba5388966742 3204:7a15cbf23c5b
119 return usermanager.test_password(prepped_username, password, realm), true; 119 return usermanager.test_password(prepped_username, password, realm), true;
120 end, 120 end,
121 scram_sha_1 = function(username, realm) 121 scram_sha_1 = function(username, realm)
122 local credentials = datamanager.load(username, host, "accounts") or {}; 122 local credentials = datamanager.load(username, host, "accounts") or {};
123 if credentials.password then 123 if credentials.password then
124 usermanager.set_password(username, credentials.password); 124 usermanager.set_password(username, credentials.password, host);
125 credentials = datamanager.load(username, host, "accounts") or {}; 125 credentials = datamanager.load(username, host, "accounts") or {};
126 end 126 end
127 local salted_password, iteration_count, salt = credentials.hashpass, credentials.iteration_count, credentials.salt; 127 local salted_password, iteration_count, salt = credentials.hashpass, credentials.iteration_count, credentials.salt;
128 salted_password = salted_password and salted_password:gsub("..", function(x) return string.char(tonumber(x, 16)); end); 128 salted_password = salted_password and salted_password:gsub("..", function(x) return string.char(tonumber(x, 16)); end);
129 return salted_password, iteration_count, salt, true; 129 return salted_password, iteration_count, salt, true;