diff options
author | Waqas Hussain <waqas20@gmail.com> | 2013-01-22 08:26:08 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2013-01-22 08:26:08 +0500 |
commit | b1f22daa932ac857022412e734533ff05bad1594 (patch) | |
tree | 9938dd9411cf02b2c7cc7a82103633f7378030b8 | |
parent | c0d4c641f38d6232df69ee902b3dcf4ae145bc15 (diff) | |
download | prosody-b1f22daa932ac857022412e734533ff05bad1594.tar.gz prosody-b1f22daa932ac857022412e734533ff05bad1594.zip |
mod_auth_internal_plain, mod_auth_internal_hashed: No need to nodeprep here.
-rw-r--r-- | plugins/mod_auth_internal_hashed.lua | 8 | ||||
-rw-r--r-- | plugins/mod_auth_internal_plain.lua | 8 |
2 files changed, 2 insertions, 14 deletions
diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua index 4535f9c9..cb6cc8ff 100644 --- a/plugins/mod_auth_internal_hashed.lua +++ b/plugins/mod_auth_internal_hashed.lua @@ -13,7 +13,6 @@ local getAuthenticationDatabaseSHA1 = require "util.sasl.scram".getAuthenticatio local usermanager = require "core.usermanager"; local generate_uuid = require "util.uuid".generate; local new_sasl = require "util.sasl".new; -local nodeprep = require "util.encodings".stringprep.nodeprep; local to_hex; do @@ -124,12 +123,7 @@ end 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, scram_sha_1 = function(sasl, username, realm) local credentials = datamanager.load(username, host, "accounts"); diff --git a/plugins/mod_auth_internal_plain.lua b/plugins/mod_auth_internal_plain.lua index 7514164d..178ae5a5 100644 --- a/plugins/mod_auth_internal_plain.lua +++ b/plugins/mod_auth_internal_plain.lua @@ -9,7 +9,6 @@ local datamanager = require "util.datamanager"; local usermanager = require "core.usermanager"; local new_sasl = require "util.sasl".new; -local nodeprep = require "util.encodings".stringprep.nodeprep; local log = module._log; local host = module.host; @@ -67,12 +66,7 @@ end function provider.get_sasl_handler() local getpass_authentication_profile = { plain = function(sasl, username, realm) - local prepped_username = nodeprep(username); - if not prepped_username then - log("debug", "NODEprep failed on username: %s", username); - return "", nil; - end - local password = usermanager.get_password(prepped_username, realm); + local password = usermanager.get_password(username, realm); if not password then return "", nil; end |