aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-10-14 10:59:54 +0100
committerMatthew Wild <mwild1@gmail.com>2014-10-14 10:59:54 +0100
commit161f220404b6519eda9288e9a38cd0c1eb76179e (patch)
tree5ad39be8aac11ff828d4ff5a36227b480a509cb3
parent8e63db7b12038c71190423517851c9225777b945 (diff)
parentcb4ef2e67f00b3ae37603398270fb535a34fe011 (diff)
downloadprosody-161f220404b6519eda9288e9a38cd0c1eb76179e.tar.gz
prosody-161f220404b6519eda9288e9a38cd0c1eb76179e.zip
Merge 0.10->trunk
-rw-r--r--plugins/mod_pubsub/pubsub.lib.lua2
-rw-r--r--plugins/mod_s2s/mod_s2s.lua2
-rwxr-xr-xprosody10
3 files changed, 6 insertions, 8 deletions
diff --git a/plugins/mod_pubsub/pubsub.lib.lua b/plugins/mod_pubsub/pubsub.lib.lua
index 5c6054d1..d85c71be 100644
--- a/plugins/mod_pubsub/pubsub.lib.lua
+++ b/plugins/mod_pubsub/pubsub.lib.lua
@@ -18,7 +18,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" };
["not-allowed"] = { "cancel", "not-allowed" };
};
local function pubsub_error_reply(stanza, error)
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index a50387fb..f9165f20 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -47,7 +47,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)
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(...)