Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(prosody): Adds a nil check for ends_with utility.

damenchoa07a1cfe93e1
diff --git a/resources/prosody-plugins/util.lib.lua b/resources/prosody-plugins/util.lib.lua
index 6cfe23e7ff..f723b24edf 100644
--- a/resources/prosody-plugins/util.lib.lua
+++ b/resources/prosody-plugins/util.lib.lua
@@ -321,8 +321,11 @@ function starts_with_one_of(str, prefixes)
return false
end
-
function ends_with(str, ending)
+ if not str then
+ return false;
+ end
+
return ending == "" or str:sub(-#ending) == ending
end