aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2013-01-22 08:30:38 +0500
committerWaqas Hussain <waqas20@gmail.com>2013-01-22 08:30:38 +0500
commit8c8ebcc4aeb65184408557a5d3f967dd2b0e7e51 (patch)
tree9938dd9411cf02b2c7cc7a82103633f7378030b8 /plugins
parentf9b9d6c4d2b71e142bc7cd254bc91171e32b2825 (diff)
parent4808daf39fd7b3d3de0e2c25e871dcbacbed1299 (diff)
downloadprosody-8c8ebcc4aeb65184408557a5d3f967dd2b0e7e51.tar.gz
prosody-8c8ebcc4aeb65184408557a5d3f967dd2b0e7e51.zip
Merge 0.9->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_auth_internal_hashed.lua8
-rw-r--r--plugins/mod_auth_internal_plain.lua8
-rw-r--r--plugins/mod_component.lua1
-rw-r--r--plugins/mod_presence.lua2
-rw-r--r--plugins/muc/muc.lib.lua2
5 files changed, 6 insertions, 15 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
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 6270b403..16084a78 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -309,6 +309,7 @@ end
module:provides("net", {
name = "component";
+ private = true;
listener = listener;
default_port = 5347;
multiplex = {
diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua
index 20d0adf0..23012750 100644
--- a/plugins/mod_presence.lua
+++ b/plugins/mod_presence.lua
@@ -18,6 +18,7 @@ local core_post_stanza = prosody.core_post_stanza;
local st = require "util.stanza";
local jid_split = require "util.jid".split;
local jid_bare = require "util.jid".bare;
+local datetime = require "util.datetime";
local hosts = hosts;
local NULL = {};
@@ -135,6 +136,7 @@ function handle_normal_presence(origin, stanza)
end
else
origin.presence = stanza;
+ stanza:tag("delay", { xmlns = "urn:xmpp:delay", from = host, stamp = datetime.datetime() }):up();
if origin.priority ~= priority then
origin.priority = priority;
recalc_resource_map(user);
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 9755ba65..16a0238d 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -529,7 +529,7 @@ function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc
self:_route_stanza(stanza);
end
stanza.attr.from, stanza.attr.to, stanza.attr.id = from, to, id;
- else
+ elseif type ~= "error" then
origin.send(st.error_reply(stanza, "cancel", "not-acceptable"));
end
elseif stanza.name == "message" and type == "groupchat" then -- groupchat messages not allowed in PM