#1553 mod_easy_invite Traceback when using an invitation link twice
Reporter
Martin
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Component-Community
Priority-Medium
Type-Defect
Status-Accepted
Difficulty-Easy
Martin
on
I created an invitation via ad-hoc command, registered a user with the link and tried to use the same link again afterwards. This is what the logs (info level) showed:
May 11 23:10:18 c2s55cc7a6394e0 error Traceback[c2s]: .../lib/prosody/prosody-modules/mod_invites/mod_invites.lua:105: attempt to index a nil value (local 'token_info')
stack traceback:
.../lib/prosody/prosody-modules/mod_invites/mod_invites.lua:105: in field 'get'
...sody/prosody-modules/mod_easy_invite/mod_easy_invite.lua:126: in field '?'
/usr/share/lua/5.3/prosody/util/events.lua:79: in function </usr/share/lua/5.3/prosody/util/events.lua:75>
(...tail calls...)
/usr/share/lua/5.3/prosody/core/stanza_router.lua:143: in upvalue 'core_process_stanza'
/usr/lib/prosody/modules/mod_c2s.lua:294: in upvalue 'func'
/usr/share/lua/5.3/prosody/util/async.lua:127: in function </usr/share/lua/5.3/prosody/util/async.lua:125>
Prosody trunk nightly build 1274 (2020-05-10, ac691f305ea7)
# Prosody directories
Data directory: /var/lib/prosody
Config directory: /etc/prosody
Source directory: /usr/lib/prosody
Plugin directories:
/var/lib/prosody/prosody-modules
/usr/lib/prosody/modules/
# Operating system
Linux 4.19.0-9-amd64
# Lua environment
Lua version: Lua 5.3
Lua module search paths:
/usr/local/share/lua/5.3/prosody/?.lua
/usr/local/share/lua/5.3/?.lua
/usr/local/share/lua/5.3/prosody/?/init.lua
/usr/local/share/lua/5.3/?/init.lua
/usr/local/lib/lua/5.3/prosody/?.lua
/usr/local/lib/lua/5.3/?.lua
/usr/local/lib/lua/5.3/prosody/?/init.lua
/usr/local/lib/lua/5.3/?/init.lua
/usr/share/lua/5.3/prosody/?.lua
/usr/share/lua/5.3/?.lua
/usr/share/lua/5.3/prosody/?/init.lua
/usr/share/lua/5.3/?/init.lua
./prosody/?.lua
./?.lua
./prosody/?/init.lua
./?/init.lua
Lua C module search paths:
/usr/local/lib/lua/5.3/prosody/?.so
/usr/local/lib/lua/5.3/?.so
/usr/lib/x86_64-linux-gnu/lua/5.3/prosody/?.so
/usr/lib/x86_64-linux-gnu/lua/5.3/?.so
/usr/lib/lua/5.3/prosody/?.so
/usr/lib/lua/5.3/?.so
/usr/local/lib/lua/5.3/loadall.so
./prosody/?.so
./?.so
LuaRocks: Not installed
# Network
Backend: epoll
# Lua module versions
lfs: LuaFileSystem 1.6.3
lxp: LuaExpat 1.3.0
socket: LuaSocket 3.0-rc1
ssl: 0.9
Zash
on
Thanks. Looks a missing check in mod_invites, rather than mod_easy_invites.
I created an invitation via ad-hoc command, registered a user with the link and tried to use the same link again afterwards. This is what the logs (info level) showed: May 11 23:10:18 c2s55cc7a6394e0 error Traceback[c2s]: .../lib/prosody/prosody-modules/mod_invites/mod_invites.lua:105: attempt to index a nil value (local 'token_info') stack traceback: .../lib/prosody/prosody-modules/mod_invites/mod_invites.lua:105: in field 'get' ...sody/prosody-modules/mod_easy_invite/mod_easy_invite.lua:126: in field '?' /usr/share/lua/5.3/prosody/util/events.lua:79: in function </usr/share/lua/5.3/prosody/util/events.lua:75> (...tail calls...) /usr/share/lua/5.3/prosody/core/stanza_router.lua:143: in upvalue 'core_process_stanza' /usr/lib/prosody/modules/mod_c2s.lua:294: in upvalue 'func' /usr/share/lua/5.3/prosody/util/async.lua:127: in function </usr/share/lua/5.3/prosody/util/async.lua:125> Prosody trunk nightly build 1274 (2020-05-10, ac691f305ea7) # Prosody directories Data directory: /var/lib/prosody Config directory: /etc/prosody Source directory: /usr/lib/prosody Plugin directories: /var/lib/prosody/prosody-modules /usr/lib/prosody/modules/ # Operating system Linux 4.19.0-9-amd64 # Lua environment Lua version: Lua 5.3 Lua module search paths: /usr/local/share/lua/5.3/prosody/?.lua /usr/local/share/lua/5.3/?.lua /usr/local/share/lua/5.3/prosody/?/init.lua /usr/local/share/lua/5.3/?/init.lua /usr/local/lib/lua/5.3/prosody/?.lua /usr/local/lib/lua/5.3/?.lua /usr/local/lib/lua/5.3/prosody/?/init.lua /usr/local/lib/lua/5.3/?/init.lua /usr/share/lua/5.3/prosody/?.lua /usr/share/lua/5.3/?.lua /usr/share/lua/5.3/prosody/?/init.lua /usr/share/lua/5.3/?/init.lua ./prosody/?.lua ./?.lua ./prosody/?/init.lua ./?/init.lua Lua C module search paths: /usr/local/lib/lua/5.3/prosody/?.so /usr/local/lib/lua/5.3/?.so /usr/lib/x86_64-linux-gnu/lua/5.3/prosody/?.so /usr/lib/x86_64-linux-gnu/lua/5.3/?.so /usr/lib/lua/5.3/prosody/?.so /usr/lib/lua/5.3/?.so /usr/local/lib/lua/5.3/loadall.so ./prosody/?.so ./?.so LuaRocks: Not installed # Network Backend: epoll # Lua module versions lfs: LuaFileSystem 1.6.3 lxp: LuaExpat 1.3.0 socket: LuaSocket 3.0-rc1 ssl: 0.9
Thanks. Looks a missing check in mod_invites, rather than mod_easy_invites.
Changes