#1418 mod_host_guard: Attempt to read a non-existent global 'configmanager'
Reporter
perflyst
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Component-Community
Type-Defect
Status-New
perflyst
on
What steps will reproduce the problem?
1. Enable mod_host_guard
2. configure "host_guard_blockall = { "pubsub.beta.kontalk.net" }"
What do you see?
Sep 02 17:03:12 startup warn Attempt to read a non-existent global 'configmanager'
stack traceback:
...dy-modules-enabled/mod_host_guard/mod_host_guard.lua:14: in main chunk
[C]: in function 'xpcall'
/usr/lib/prosody/core/modulemanager.lua:179: in function 'do_load_module'
/usr/lib/prosody/core/modulemanager.lua:261: in function 'load'
/usr/lib/prosody/core/modulemanager.lua:78: in function '?'
/usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75>
(tail call): ?
/usr/lib/prosody/core/hostmanager.lua:108: in function 'activate'
/usr/lib/prosody/core/hostmanager.lua:58: in function '?'
/usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75>
(tail call): ?
/usr/lib/prosody/util/startup.lua:344: in function 'prepare_to_start'
/usr/lib/prosody/util/startup.lua:565: in function 'f'
/usr/lib/prosody/util/async.lua:139: in function 'func'
/usr/lib/prosody/util/async.lua:127: in function </usr/lib/prosody/util/async.lua:125>
What version of the product are you using? On what operating system?
Prosody trunk nightly build 1136 (2019-09-01, 6c804b6b2ca2) on Debian Stretch
Zash
on
Thanks for the report. This is a community module not maintained by the Prosody team, so tagging as such.
Changes
tags Component-Community
Sergei Golovan
on
Hi! The bug is fairly easy to fix. After applying the following patch, the module is now working for me:
-------------------------------------
--- a/mod_host_guard/mod_host_guard.lua
+++ b/mod_host_guard/mod_host_guard.lua
@@ -11,7 +11,7 @@
local guard_protect = module:get_option_set("host_guard_selective", {})
local guard_block_bl = module:get_option_set("host_guard_blacklist", {})
-local config = configmanager
+local config = require "prosody.core.configmanager"
local error_reply = require "util.stanza".error_reply
local tostring = tostring
-------------------------------------
What steps will reproduce the problem? 1. Enable mod_host_guard 2. configure "host_guard_blockall = { "pubsub.beta.kontalk.net" }" What do you see? Sep 02 17:03:12 startup warn Attempt to read a non-existent global 'configmanager' stack traceback: ...dy-modules-enabled/mod_host_guard/mod_host_guard.lua:14: in main chunk [C]: in function 'xpcall' /usr/lib/prosody/core/modulemanager.lua:179: in function 'do_load_module' /usr/lib/prosody/core/modulemanager.lua:261: in function 'load' /usr/lib/prosody/core/modulemanager.lua:78: in function '?' /usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75> (tail call): ? /usr/lib/prosody/core/hostmanager.lua:108: in function 'activate' /usr/lib/prosody/core/hostmanager.lua:58: in function '?' /usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75> (tail call): ? /usr/lib/prosody/util/startup.lua:344: in function 'prepare_to_start' /usr/lib/prosody/util/startup.lua:565: in function 'f' /usr/lib/prosody/util/async.lua:139: in function 'func' /usr/lib/prosody/util/async.lua:127: in function </usr/lib/prosody/util/async.lua:125> What version of the product are you using? On what operating system? Prosody trunk nightly build 1136 (2019-09-01, 6c804b6b2ca2) on Debian Stretch
Thanks for the report. This is a community module not maintained by the Prosody team, so tagging as such.
ChangesHi! The bug is fairly easy to fix. After applying the following patch, the module is now working for me: ------------------------------------- --- a/mod_host_guard/mod_host_guard.lua +++ b/mod_host_guard/mod_host_guard.lua @@ -11,7 +11,7 @@ local guard_protect = module:get_option_set("host_guard_selective", {}) local guard_block_bl = module:get_option_set("host_guard_blacklist", {}) -local config = configmanager +local config = require "prosody.core.configmanager" local error_reply = require "util.stanza".error_reply local tostring = tostring -------------------------------------