diff options
author | Kim Alvefur <zash@zash.se> | 2022-04-04 18:44:57 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2022-04-04 18:44:57 +0200 |
commit | a6968002916643a266fe5079d74f89a5f8ef0154 (patch) | |
tree | 13942ffedc3f5c4fbb04c97a9977b2fc4cc4ddb5 /core | |
parent | 0f493bd245b85da4272d360c85d193321d7e2e3f (diff) | |
download | prosody-a6968002916643a266fe5079d74f89a5f8ef0154.tar.gz prosody-a6968002916643a266fe5079d74f89a5f8ef0154.zip |
core.modulemanager: Fix global flag on per-host instances of shared modules (fix #1736)
This flag is something of a shortcut for `module.host == "*"` and should
always be equal to that. Its absence on the proxy object made the
property of the global module instance visible, causing problems such as
with URL reporting in mod_http
Diffstat (limited to 'core')
-rw-r--r-- | core/modulemanager.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index b66f3944..0ddf175b 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -189,6 +189,7 @@ local function do_load_module(host, module_name, state) if module_has_method(mod, "add_host") then local _log = logger.init(host..":"..module_name); local host_module_api = setmetatable({ + global = false, host = host, event_handlers = new_multitable(), items = {}; _log = _log, log = function (self, ...) return _log(...); end; --luacheck: ignore 212/self },{ |