Software /
code /
prosody
Comparison
plugins/mod_auth_internal_hashed.lua @ 8201:a0ad62a269df
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 28 Aug 2017 21:05:12 +0200 |
parent | 8192:4354f556c5db |
child | 10218:e458578ddfd3 |
child | 10522:b1ca849b8e3a |
comparison
equal
deleted
inserted
replaced
8185:e89320b8a789 | 8201:a0ad62a269df |
---|---|
118 end, | 118 end, |
119 scram_sha_1 = function(_, username) | 119 scram_sha_1 = function(_, username) |
120 local credentials = accounts:get(username); | 120 local credentials = accounts:get(username); |
121 if not credentials then return; end | 121 if not credentials then return; end |
122 if credentials.password then | 122 if credentials.password then |
123 usermanager.set_password(username, credentials.password, host); | 123 if provider.set_password(username, credentials.password) == nil then |
124 return nil, "Auth failed. Could not set hashed password from plaintext."; | |
125 end | |
124 credentials = accounts:get(username); | 126 credentials = accounts:get(username); |
125 if not credentials then return; end | 127 if not credentials then return; end |
126 end | 128 end |
127 | 129 |
128 local stored_key, server_key = credentials.stored_key, credentials.server_key; | 130 local stored_key, server_key = credentials.stored_key, credentials.server_key; |