Software /
code /
prosody
Comparison
plugins/mod_auth_internal_hashed.lua @ 8192:4354f556c5db
core.usermanager, various modules: Disconnect other resources on password change (thanks waqas) (fixes #512)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 28 Jul 2017 13:15:29 +0200 |
parent | 8056:cacf14c218ab |
child | 10218:e458578ddfd3 |
child | 10522:b1ca849b8e3a |
comparison
equal
deleted
inserted
replaced
8191:d43012448c1f | 8192:4354f556c5db |
---|---|
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; |