aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_compression.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-02-18 20:03:12 +0100
committerKim Alvefur <zash@zash.se>2014-02-18 20:03:12 +0100
commit33e2b639baa050d467f9f649c8bf12d8e06234a4 (patch)
tree16b5243ee4bd40235ab27d15bbc9616f31814f9f /plugins/mod_compression.lua
parente4ea0b094a43dd93fab253dff36efbe8aa3dc330 (diff)
downloadprosody-33e2b639baa050d467f9f649c8bf12d8e06234a4.tar.gz
prosody-33e2b639baa050d467f9f649c8bf12d8e06234a4.zip
mod_compression: Only allow compression on authenticated streams
Diffstat (limited to 'plugins/mod_compression.lua')
-rw-r--r--plugins/mod_compression.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_compression.lua b/plugins/mod_compression.lua
index 92856099..531ea8ea 100644
--- a/plugins/mod_compression.lua
+++ b/plugins/mod_compression.lua
@@ -126,7 +126,7 @@ end
module:hook("stanza/http://jabber.org/protocol/compress:compressed", function(event)
local session = event.origin;
- if session.type == "s2sout_unauthed" or session.type == "s2sout" then
+ if session.type == "s2sout" then
session.log("debug", "Activating compression...")
-- create deflate and inflate streams
local deflate_stream = get_deflate_stream(session);
@@ -150,7 +150,7 @@ end);
module:hook("stanza/http://jabber.org/protocol/compress:compress", function(event)
local session, stanza = event.origin, event.stanza;
- if session.type == "c2s" or session.type == "s2sin" or session.type == "c2s_unauthed" or session.type == "s2sin_unauthed" then
+ if session.type == "c2s" or session.type == "s2sin" then
-- fail if we are already compressed
if session.compressed then
local error_st = st.stanza("failure", {xmlns=xmlns_compression_protocol}):tag("setup-failed");