Changeset

12450:7efd4bcaa95c 0.12

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
author Kim Alvefur <zash@zash.se>
date Mon, 04 Apr 2022 18:44:57 +0200
parents 12448:fb7e76c1ad1c
children 12451:76887863a6ae 12452:c475a7802169
files core/modulemanager.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/core/modulemanager.lua	Sun Apr 03 12:56:11 2022 +0100
+++ b/core/modulemanager.lua	Mon Apr 04 18:44:57 2022 +0200
@@ -189,6 +189,7 @@
 		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
 			},{