Software / code / prosody
Comparison
plugins/mod_auth_internal_plain.lua @ 5509:76744bda82be
mod_auth_internal_plain: Don't log passwords, even at debug level
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 23 Apr 2013 15:13:51 +0100 |
| parent | 5500:eeea0eb2602a |
| child | 5776:bd0ff8ae98a8 |
comparison
equal
deleted
inserted
replaced
| 5508:b7a8615e2be1 | 5509:76744bda82be |
|---|---|
| 17 -- define auth provider | 17 -- define auth provider |
| 18 local provider = {}; | 18 local provider = {}; |
| 19 log("debug", "initializing internal_plain authentication provider for host '%s'", host); | 19 log("debug", "initializing internal_plain authentication provider for host '%s'", host); |
| 20 | 20 |
| 21 function provider.test_password(username, password) | 21 function provider.test_password(username, password) |
| 22 log("debug", "test password '%s' for user %s at host %s", password, username, host); | 22 log("debug", "test password for user %s at host %s", username, host); |
| 23 local credentials = accounts:get(username) or {}; | 23 local credentials = accounts:get(username) or {}; |
| 24 | 24 |
| 25 if password == credentials.password then | 25 if password == credentials.password then |
| 26 return true; | 26 return true; |
| 27 else | 27 else |