Software /
code /
prosody-modules
Diff
mod_auth_external/mod_auth_external.lua @ 902:490cb9161c81
mod_auth_{external,internal_yubikey,ldap,ldap2,sql}: No need to nodeprep in SASL handler.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 26 Jan 2013 04:34:05 +0500 |
parent | 846:5ddc43ce8993 |
child | 1086:50ee38e95e75 |
line wrap: on
line diff
--- a/mod_auth_external/mod_auth_external.lua Sat Jan 26 00:15:24 2013 +0100 +++ b/mod_auth_external/mod_auth_external.lua Sat Jan 26 04:34:05 2013 +0500 @@ -10,7 +10,6 @@ -- -local nodeprep = require "util.encodings".stringprep.nodeprep; --local process = require "process"; local lpc; pcall(function() lpc = require "lpc"; end); @@ -81,8 +80,6 @@ function do_query(kind, username, password) if not username then return nil, "not-acceptable"; end - username = nodeprep(username); - if not username then return nil, "jid-malformed"; end local query = (password and "%s:%s:%s:%s" or "%s:%s:%s"):format(kind, username, host, password); local len = #query @@ -132,12 +129,7 @@ function provider.get_sasl_handler() local testpass_authentication_profile = { plain_test = function(sasl, username, password, realm) - local prepped_username = nodeprep(username); - if not prepped_username then - log("debug", "NODEprep failed on username: %s", username); - return "", nil; - end - return usermanager.test_password(prepped_username, realm, password), true; + return usermanager.test_password(username, realm, password), true; end, }; return new_sasl(host, testpass_authentication_profile);