I just got the following backtrace from mod_admin_telnet when using "show_c2s":
Mar 21 12:01:49 mod_admin_telnet error Traceback[telnet]: /usr/lib/prosody/modules/mod_admin_telnet.lua:601: attempt to index local 'info' (a nil value)
stack traceback:
/usr/lib/prosody/modules/mod_admin_telnet.lua:601: in function 'annotate'
/usr/lib/prosody/modules/mod_admin_telnet.lua:676: in function 'callback'
/usr/lib/prosody/modules/mod_admin_telnet.lua:656: in function 'func'
/usr/lib/prosody/util/array.lua:92: in function </usr/lib/prosody/util/array.lua:90>
(tail call): ?
/usr/lib/prosody/modules/mod_admin_telnet.lua:655: in function 'show_c2s'
/usr/lib/prosody/modules/mod_admin_telnet.lua:669: in function </usr/lib/prosody/modules/mod_admin_telnet.lua:665>
(tail call): ?
(tail call): ?
/usr/lib/prosody/modules/mod_admin_telnet.lua:141: in function 'process_line'
/usr/lib/prosody/modules/mod_admin_telnet.lua:88: in function 'func'
/usr/lib/prosody/util/async.lua:127: in function </usr/lib/prosody/util/async.lua:125>
Mar 21 12:01:49 mod_admin_telnet error Traceback[telnet]: /usr/lib/prosody/modules/mod_admin_telnet.lua:601: attempt to index local 'info' (a nil value)
stack traceback:
/usr/lib/prosody/modules/mod_admin_telnet.lua:601: in function 'annotate'
/usr/lib/prosody/modules/mod_admin_telnet.lua:676: in function 'callback'
/usr/lib/prosody/modules/mod_admin_telnet.lua:656: in function 'func'
/usr/lib/prosody/util/array.lua:92: in function </usr/lib/prosody/util/array.lua:90>
(tail call): ?
/usr/lib/prosody/modules/mod_admin_telnet.lua:655: in function 'show_c2s'
/usr/lib/prosody/modules/mod_admin_telnet.lua:669: in function </usr/lib/prosody/modules/mod_admin_telnet.lua:665>
(tail call): ?
(tail call): ?
/usr/lib/prosody/modules/mod_admin_telnet.lua:141: in function 'process_line'
/usr/lib/prosody/modules/mod_admin_telnet.lua:88: in function 'func'
/usr/lib/prosody/util/async.lua:127: in function </usr/lib/prosody/util/async.lua:125>
Zash
on
Seems this could happen before the TLS session has been fully established. OpenSSL documentation for the function SSL_get_current_cipher() says that it returns NULL in this case, and then the LuaSec wrapping function returns nil, triggering this nil indexing error.
I just got the following backtrace from mod_admin_telnet when using "show_c2s": Mar 21 12:01:49 mod_admin_telnet error Traceback[telnet]: /usr/lib/prosody/modules/mod_admin_telnet.lua:601: attempt to index local 'info' (a nil value) stack traceback: /usr/lib/prosody/modules/mod_admin_telnet.lua:601: in function 'annotate' /usr/lib/prosody/modules/mod_admin_telnet.lua:676: in function 'callback' /usr/lib/prosody/modules/mod_admin_telnet.lua:656: in function 'func' /usr/lib/prosody/util/array.lua:92: in function </usr/lib/prosody/util/array.lua:90> (tail call): ? /usr/lib/prosody/modules/mod_admin_telnet.lua:655: in function 'show_c2s' /usr/lib/prosody/modules/mod_admin_telnet.lua:669: in function </usr/lib/prosody/modules/mod_admin_telnet.lua:665> (tail call): ? (tail call): ? /usr/lib/prosody/modules/mod_admin_telnet.lua:141: in function 'process_line' /usr/lib/prosody/modules/mod_admin_telnet.lua:88: in function 'func' /usr/lib/prosody/util/async.lua:127: in function </usr/lib/prosody/util/async.lua:125> Mar 21 12:01:49 mod_admin_telnet error Traceback[telnet]: /usr/lib/prosody/modules/mod_admin_telnet.lua:601: attempt to index local 'info' (a nil value) stack traceback: /usr/lib/prosody/modules/mod_admin_telnet.lua:601: in function 'annotate' /usr/lib/prosody/modules/mod_admin_telnet.lua:676: in function 'callback' /usr/lib/prosody/modules/mod_admin_telnet.lua:656: in function 'func' /usr/lib/prosody/util/array.lua:92: in function </usr/lib/prosody/util/array.lua:90> (tail call): ? /usr/lib/prosody/modules/mod_admin_telnet.lua:655: in function 'show_c2s' /usr/lib/prosody/modules/mod_admin_telnet.lua:669: in function </usr/lib/prosody/modules/mod_admin_telnet.lua:665> (tail call): ? (tail call): ? /usr/lib/prosody/modules/mod_admin_telnet.lua:141: in function 'process_line' /usr/lib/prosody/modules/mod_admin_telnet.lua:88: in function 'func' /usr/lib/prosody/util/async.lua:127: in function </usr/lib/prosody/util/async.lua:125>
Seems this could happen before the TLS session has been fully established. OpenSSL documentation for the function SSL_get_current_cipher() says that it returns NULL in this case, and then the LuaSec wrapping function returns nil, triggering this nil indexing error.
ChangesFixed in https://hg.prosody.im/0.11/rev/fd77b6cec38d. Thanks for the report.
Changes