[Pkg-xmpp-devel] Bug#1059825: /usr/bin/prosodyctl: prosodyctl check dns fails with stacktrace

Kim Alvefur zash at zash.se
Tue Jan 2 16:27:12 GMT 2024


On Tue, Jan 02, 2024 at 02:31:09AM +0000, Joseph Nahmias wrote:
>When trying to debug my prosody installation, I tried to run prosodyctl
>check dns and got the following:
>
># prosodyctl check dns
>lua5.4: /usr/bin/prosodyctl:635: attempt to index a number value
>stack traceback:
>	[C]: in for iterator 'for iterator'
>	/usr/lib/prosody/util/set.lua:74: in method 'add_list'
>	/usr/lib/prosody/util/set.lua:97: in function 'util.set.new'
>	/usr/lib/prosody/util/prosodyctl/check.lua:718: in function 'util.prosodyctl.check.check'

This can happen if Prosody is incorrectly given a scalar value where it
expects a Set or List of items. In this case it most likely happened
because it was set like

     c2s_direct_tls_ports = 5223

instead of

     c2s_direct_tls_ports = { 5223 }

Prosody itself has some leniency for mistakes like this but e.g.
prosodyctl did not because relevant config normalization code is part of
the API exposed to modules / plugins, which prosodyctl is not.

This has previously been reported upstream at
<https://issues.prosody.im/896> and has been fixed in 0.12.4, already
available in testing/trixie.

-- 
Happy New Year,
Kim "Zash" Alvefur
Prosody developer



More information about the Pkg-xmpp-devel mailing list