Sfoglia il codice sorgente

fix: Adds a null check in mod_limits_exceptions.

It is failing on prosody 0.11.4 with mod_limits_exception.lua:29: attempt to call method 'set_stanza_size_limit' (a nil value). That prosody misses set_stanza_size_limit.
master
Дамян Минков 4 anni fa
parent
commit
29dd0cf726
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      resources/prosody-plugins/mod_limits_exception.lua

+ 1
- 1
resources/prosody-plugins/mod_limits_exception.lua Vedi File

@@ -24,7 +24,7 @@ module:hook("authentication-success", function (event)
24 24
 			session.throttle = nil;
25 25
 		end
26 26
 
27
-		if unlimited_stanza_size_limit then
27
+		if unlimited_stanza_size_limit and session.stream.set_stanza_size_limit then
28 28
 			module:log('info', 'Setting stanza size limits for %s to %s', jid, unlimited_stanza_size_limit)
29 29
 			session.stream:set_stanza_size_limit(unlimited_stanza_size_limit);
30 30
 		end

Loading…
Annulla
Salva