-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up prosody modules with some extra checks #14020
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oct 20 12:22:50 mod_bosh error Traceback[bosh]: /usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:336: bad argument #1 to 'lower' (string expected, got userdata) stack traceback: [C]: in function 'lower' /usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:336: in function 'verify_room' ...re/jitsi-meet/prosody-plugins/mod_token_verification.lua:78: in function 'verify_user'
error Traceback[c2s]: ...itsi-meet/prosody-plugins/mod_speakerstats_component.lua:124: attempt to index field '?' (a nil value) stack traceback: ...itsi-meet/prosody-plugins/mod_speakerstats_component.lua:124: in function '?'
c2saaaad95a16c0 error Traceback[c2s]: ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:345: attempt to index local 'main_room' (a nil value) stack traceback: ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:345: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/modules/muc/muc.lib.lua:496: in function </usr/lib/prosody/modules/muc/muc.lib.lua:492>
c2saaaae3024810 error Traceback[c2s]: /usr/share/jitsi-meet/prosody-plugins/mod_muc_allowners.lua:171: attempt to index local 'room' (a nil value) stack traceback: /usr/share/jitsi-meet/prosody-plugins/mod_muc_allowners.lua:171: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77>
mod_bosh error Traceback[bosh]: ...share/jitsi-meet/prosody-plugins/mod_muc_lobby_rooms.lua:168: attempt to index local 'lobby_room' (a nil value) stack traceback: ...share/jitsi-meet/prosody-plugins/mod_muc_lobby_rooms.lua:168: in function '?' /usr/share/lua/5.2/prosody/util/filters.lua:25: in function 'filter' /usr/lib/prosody/modules/mod_bosh.lua:361: in function 'send' /usr/lib/prosody/modules/muc/mod_muc.lua:495: in function '?'
s2sinaaaaf2817260 error Traceback[s2s]: /usr/share/jitsi-meet/prosody-plugins/mod_fmuc.lua:295: attempt to index local 'occupant' (a nil value) stack traceback: /usr/share/jitsi-meet/prosody-plugins/mod_fmuc.lua:295: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/modules/muc/muc.lib.lua:1201: in function </usr/lib/prosody/modules/muc/muc.lib.lua:1194>
c2s55f4d5411dd0 error Traceback[c2s]: /usr/share/jitsi-meet/prosody-plugins/mod_muc_flip.lua:120: attempt to index local 'kicked_occupant' (a nil value) stack traceback: /usr/share/jitsi-meet/prosody-plugins/mod_muc_flip.lua:120: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/modules/muc/muc.lib.lua:791: in function </usr/lib/prosody/modules/muc/muc.lib.lua:616>
Objects should not be set in room._data as this field is being serialized and we see errors like. error Traceback[c2s]: /usr/share/lua/5.2/prosody/util/serialization.lua:34: Can't serialize userdata stack traceback: [C]: in function 'error' /usr/share/lua/5.2/prosody/util/serialization.lua:34: in function </usr/share/lua/5.2/prosody/util/serialization.lua:33> (...tail calls...) /usr/share/lua/5.2/prosody/util/serialization.lua:199: in function 'serialize_table' /usr/share/lua/5.2/prosody/util/serialization.lua:197: in function 'serialize_table' /usr/share/lua/5.2/prosody/util/serialization.lua:197: in function 'serialize_table' /usr/share/lua/5.2/prosody/util/serialization.lua:219: in function </usr/share/lua/5.2/prosody/util/serialization.lua:217> (...tail calls...) /usr/lib/prosody/modules/mod_storage_memory.lua:42: in function </usr/lib/prosody/modules/mod_storage_memory.lua:40> (...tail calls...) ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:207: in function 'create_breakout_room'
bgrozev
reviewed
Nov 6, 2023
@@ -344,7 +345,11 @@ function Util:verify_room(session, room_address) | |||
|
|||
local auth_room = session.jitsi_meet_room; | |||
if auth_room then | |||
auth_room = string.lower(auth_room); | |||
if type(value) == 'string' then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's value
? Should it be type(auth_room)
?
bgrozev
approved these changes
Nov 6, 2023
smcclem
added a commit
to smcclem/jitsi-meet
that referenced
this pull request
Nov 16, 2023
* fix: Adds check for jitsi_meet_room not being string. Oct 20 12:22:50 mod_bosh error Traceback[bosh]: /usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:336: bad argument #1 to 'lower' (string expected, got userdata) stack traceback: [C]: in function 'lower' /usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:336: in function 'verify_room' ...re/jitsi-meet/prosody-plugins/mod_token_verification.lua:78: in function 'verify_user' * fix: Adds check for missing speaker stats for occupant. error Traceback[c2s]: ...itsi-meet/prosody-plugins/mod_speakerstats_component.lua:124: attempt to index field '?' (a nil value) stack traceback: ...itsi-meet/prosody-plugins/mod_speakerstats_component.lua:124: in function '?' * fix: Nil check for breakout_rooms. c2saaaad95a16c0 error Traceback[c2s]: ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:345: attempt to index local 'main_room' (a nil value) stack traceback: ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:345: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/modules/muc/muc.lib.lua:496: in function </usr/lib/prosody/modules/muc/muc.lib.lua:492> * fix: Adds nil check in allowners. c2saaaae3024810 error Traceback[c2s]: /usr/share/jitsi-meet/prosody-plugins/mod_muc_allowners.lua:171: attempt to index local 'room' (a nil value) stack traceback: /usr/share/jitsi-meet/prosody-plugins/mod_muc_allowners.lua:171: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77> * fix: Adds nil check in lobby. mod_bosh error Traceback[bosh]: ...share/jitsi-meet/prosody-plugins/mod_muc_lobby_rooms.lua:168: attempt to index local 'lobby_room' (a nil value) stack traceback: ...share/jitsi-meet/prosody-plugins/mod_muc_lobby_rooms.lua:168: in function '?' /usr/share/lua/5.2/prosody/util/filters.lua:25: in function 'filter' /usr/lib/prosody/modules/mod_bosh.lua:361: in function 'send' /usr/lib/prosody/modules/muc/mod_muc.lua:495: in function '?' * fix: Fixes nil error in fmuc. s2sinaaaaf2817260 error Traceback[s2s]: /usr/share/jitsi-meet/prosody-plugins/mod_fmuc.lua:295: attempt to index local 'occupant' (a nil value) stack traceback: /usr/share/jitsi-meet/prosody-plugins/mod_fmuc.lua:295: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/modules/muc/muc.lib.lua:1201: in function </usr/lib/prosody/modules/muc/muc.lib.lua:1194> * fix: Fixes nil occupant. c2s55f4d5411dd0 error Traceback[c2s]: /usr/share/jitsi-meet/prosody-plugins/mod_muc_flip.lua:120: attempt to index local 'kicked_occupant' (a nil value) stack traceback: /usr/share/jitsi-meet/prosody-plugins/mod_muc_flip.lua:120: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/modules/muc/muc.lib.lua:791: in function </usr/lib/prosody/modules/muc/muc.lib.lua:616> * fix: Fixes caching main room. Objects should not be set in room._data as this field is being serialized and we see errors like. error Traceback[c2s]: /usr/share/lua/5.2/prosody/util/serialization.lua:34: Can't serialize userdata stack traceback: [C]: in function 'error' /usr/share/lua/5.2/prosody/util/serialization.lua:34: in function </usr/share/lua/5.2/prosody/util/serialization.lua:33> (...tail calls...) /usr/share/lua/5.2/prosody/util/serialization.lua:199: in function 'serialize_table' /usr/share/lua/5.2/prosody/util/serialization.lua:197: in function 'serialize_table' /usr/share/lua/5.2/prosody/util/serialization.lua:197: in function 'serialize_table' /usr/share/lua/5.2/prosody/util/serialization.lua:219: in function </usr/share/lua/5.2/prosody/util/serialization.lua:217> (...tail calls...) /usr/lib/prosody/modules/mod_storage_memory.lua:42: in function </usr/lib/prosody/modules/mod_storage_memory.lua:40> (...tail calls...) ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:207: in function 'create_breakout_room' * fix: Fixes calling save_occupant after changing its role. * squash: Fixed passed value to type.
smcclem
added a commit
to smcclem/jitsi-meet
that referenced
this pull request
Nov 16, 2023
* fix: Adds check for jitsi_meet_room not being string. Oct 20 12:22:50 mod_bosh error Traceback[bosh]: /usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:336: bad argument #1 to 'lower' (string expected, got userdata) stack traceback: [C]: in function 'lower' /usr/share/jitsi-meet/prosody-plugins/token/util.lib.lua:336: in function 'verify_room' ...re/jitsi-meet/prosody-plugins/mod_token_verification.lua:78: in function 'verify_user' * fix: Adds check for missing speaker stats for occupant. error Traceback[c2s]: ...itsi-meet/prosody-plugins/mod_speakerstats_component.lua:124: attempt to index field '?' (a nil value) stack traceback: ...itsi-meet/prosody-plugins/mod_speakerstats_component.lua:124: in function '?' * fix: Nil check for breakout_rooms. c2saaaad95a16c0 error Traceback[c2s]: ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:345: attempt to index local 'main_room' (a nil value) stack traceback: ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:345: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/modules/muc/muc.lib.lua:496: in function </usr/lib/prosody/modules/muc/muc.lib.lua:492> * fix: Adds nil check in allowners. c2saaaae3024810 error Traceback[c2s]: /usr/share/jitsi-meet/prosody-plugins/mod_muc_allowners.lua:171: attempt to index local 'room' (a nil value) stack traceback: /usr/share/jitsi-meet/prosody-plugins/mod_muc_allowners.lua:171: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77> * fix: Adds nil check in lobby. mod_bosh error Traceback[bosh]: ...share/jitsi-meet/prosody-plugins/mod_muc_lobby_rooms.lua:168: attempt to index local 'lobby_room' (a nil value) stack traceback: ...share/jitsi-meet/prosody-plugins/mod_muc_lobby_rooms.lua:168: in function '?' /usr/share/lua/5.2/prosody/util/filters.lua:25: in function 'filter' /usr/lib/prosody/modules/mod_bosh.lua:361: in function 'send' /usr/lib/prosody/modules/muc/mod_muc.lua:495: in function '?' * fix: Fixes nil error in fmuc. s2sinaaaaf2817260 error Traceback[s2s]: /usr/share/jitsi-meet/prosody-plugins/mod_fmuc.lua:295: attempt to index local 'occupant' (a nil value) stack traceback: /usr/share/jitsi-meet/prosody-plugins/mod_fmuc.lua:295: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/modules/muc/muc.lib.lua:1201: in function </usr/lib/prosody/modules/muc/muc.lib.lua:1194> * fix: Fixes nil occupant. c2s55f4d5411dd0 error Traceback[c2s]: /usr/share/jitsi-meet/prosody-plugins/mod_muc_flip.lua:120: attempt to index local 'kicked_occupant' (a nil value) stack traceback: /usr/share/jitsi-meet/prosody-plugins/mod_muc_flip.lua:120: in function '?' /usr/share/lua/5.2/prosody/util/events.lua:81: in function </usr/share/lua/5.2/prosody/util/events.lua:77> (...tail calls...) /usr/lib/prosody/modules/muc/muc.lib.lua:791: in function </usr/lib/prosody/modules/muc/muc.lib.lua:616> * fix: Fixes caching main room. Objects should not be set in room._data as this field is being serialized and we see errors like. error Traceback[c2s]: /usr/share/lua/5.2/prosody/util/serialization.lua:34: Can't serialize userdata stack traceback: [C]: in function 'error' /usr/share/lua/5.2/prosody/util/serialization.lua:34: in function </usr/share/lua/5.2/prosody/util/serialization.lua:33> (...tail calls...) /usr/share/lua/5.2/prosody/util/serialization.lua:199: in function 'serialize_table' /usr/share/lua/5.2/prosody/util/serialization.lua:197: in function 'serialize_table' /usr/share/lua/5.2/prosody/util/serialization.lua:197: in function 'serialize_table' /usr/share/lua/5.2/prosody/util/serialization.lua:219: in function </usr/share/lua/5.2/prosody/util/serialization.lua:217> (...tail calls...) /usr/lib/prosody/modules/mod_storage_memory.lua:42: in function </usr/lib/prosody/modules/mod_storage_memory.lua:40> (...tail calls...) ...re/jitsi-meet/prosody-plugins/mod_muc_breakout_rooms.lua:207: in function 'create_breakout_room' * fix: Fixes calling save_occupant after changing its role. * squash: Fixed passed value to type.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.