Software /
code /
prosody
Comparison
plugins/mod_auth_internal_hashed.lua @ 3335:f13306ce3417
mod_auth_internal, mod_auth_internal_hashed: Remove checking for nil or empty password and pretending it means the user doesn't exist. Hopefully with more success than Custer.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 08 Jul 2010 20:59:53 +0100 |
parent | 3289:180a0b3b018d |
child | 3389:9e2485880cd6 |
comparison
equal
deleted
inserted
replaced
3334:73f078caf99d | 3335:f13306ce3417 |
---|---|
119 local account = datamanager.load(username, host, "accounts"); | 119 local account = datamanager.load(username, host, "accounts"); |
120 if not account then | 120 if not account then |
121 log("debug", "account not found for username '%s' at host '%s'", username, module.host); | 121 log("debug", "account not found for username '%s' at host '%s'", username, module.host); |
122 return nil, "Auth failed. Invalid username"; | 122 return nil, "Auth failed. Invalid username"; |
123 end | 123 end |
124 --[[if (account.hashpass == nil or string.len(account.hashpass) == 0) and (account.password == nil or string.len(account.password) == 0) then | |
125 log("debug", "account password not set or zero-length for username '%s' at host '%s'", username, module.host); | |
126 return nil, "Auth failed. Password invalid."; | |
127 end]] | |
128 return true; | 124 return true; |
129 end | 125 end |
130 | 126 |
131 function provider.create_user(username, password) | 127 function provider.create_user(username, password) |
132 local salt = generate_uuid(); | 128 local salt = generate_uuid(); |