From aa9e7abd10b393baf628e3211945c8e457978ff3 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 10 Oct 2014 00:56:53 +0200 Subject: mod_s2s: Capitalize log message --- plugins/mod_s2s/mod_s2s.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index ee03987d..d8846a6f 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -49,7 +49,7 @@ local bouncy_stanzas = { message = true, presence = true, iq = true }; local function bounce_sendq(session, reason) local sendq = session.sendq; if not sendq then return; end - session.log("info", "sending error replies for "..#sendq.." queued stanzas because of failed outgoing connection to "..tostring(session.to_host)); + session.log("info", "Sending error replies for "..#sendq.." queued stanzas because of failed outgoing connection to "..tostring(session.to_host)); local dummy = { type = "s2sin"; send = function(s) -- cgit v1.2.3 From 887f411c4e018eb2ac034e80c6477d2cd253f729 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 13 Oct 2014 21:02:04 +0200 Subject: prosody: Make getfenv() replacement for require() sandboxing local to avoid polluting the globals table --- prosody | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/prosody b/prosody index aab803c5..e8f81d5d 100755 --- a/prosody +++ b/prosody @@ -151,13 +151,11 @@ function sandbox_require() -- for neat sandboxing of modules local _realG = _G; local _real_require = require; - if not getfenv then + local getfenv = getfenv or function (f) -- FIXME: This is a hack to replace getfenv() in Lua 5.2 - function getfenv(f) - local name, env = debug.getupvalue(debug.getinfo(f or 1).func, 1); - if name == "_ENV" then - return env; - end + local name, env = debug.getupvalue(debug.getinfo(f or 1).func, 1); + if name == "_ENV" then + return env; end end function require(...) -- cgit v1.2.3 From 4a4ec58c8d72ad6b9670ba697b4a98d35e21e2f6 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 14 Oct 2014 10:58:11 +0100 Subject: mod_pubsub: Fix error type of 'forbidden' (change from 'cancel' to 'auth') --- plugins/mod_pubsub.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_pubsub.lua b/plugins/mod_pubsub.lua index 926ed4f2..04f2b615 100644 --- a/plugins/mod_pubsub.lua +++ b/plugins/mod_pubsub.lua @@ -39,7 +39,7 @@ local pubsub_errors = { ["nodeid-required"] = { "modify", "bad-request", nil, "nodeid-required" }; ["item-not-found"] = { "cancel", "item-not-found" }; ["not-subscribed"] = { "modify", "unexpected-request", nil, "not-subscribed" }; - ["forbidden"] = { "cancel", "forbidden" }; + ["forbidden"] = { "auth", "forbidden" }; }; function pubsub_error_reply(stanza, error) local e = pubsub_errors[error]; -- cgit v1.2.3