#1059825 /usr/bin/prosodyctl: prosodyctl check dns fails with stacktrace

Package:
prosody
Source:
prosody
Description:
Lightweight Jabber/XMPP server
Submitter:
Joseph Nahmias
Date:
2024-01-02 16:45:03 UTC
Severity:
normal
#1059825#5
Date:
2024-01-02 02:31:09 UTC
From:
To:
Hello,

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'
	/usr/bin/prosodyctl:751: in upvalue 'func'
	/usr/lib/prosody/util/async.lua:144: in function </usr/lib/prosody/util/async.lua:142>
stack traceback:
	[C]: in function 'error'
	/usr/bin/prosodyctl:635: in local 'handler'
	/usr/lib/prosody/util/async.lua:232: in method 'run'
	/usr/bin/prosodyctl:754: in main chunk
	[C]: in ?

Is there a dependancy missing?

Thanks,
--Joe

#1059825#10
Date:
2024-01-02 16:27:12 UTC
From:
To:
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.

#1059825#15
Date:
2024-01-02 16:43:07 UTC
From:
To:
Quoting Kim Alvefur <zash@zash.se>:

And in stable backports :-)

Thank you, Zash!