projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mod_tls: Respond with proper error when TLS cannot be negotiated.
[prosody.git]
/
plugins
/
mod_tls.lua
diff --git
a/plugins/mod_tls.lua
b/plugins/mod_tls.lua
index 15cdb3e3806bb39b9405295ffaa9e3e9e6805d08..9214dd1206fd3e38a78e824cd6ce8bc93af30215 100644
(file)
--- a/
plugins/mod_tls.lua
+++ b/
plugins/mod_tls.lua
@@
-27,8
+27,9
@@
module:hook("stanza/urn:ietf:params:xml:ns:xmpp-tls:starttls", function(event)
origin.log("info", "TLS negotiation started for %s...", origin.type);
origin.secure = false;
else
origin.log("info", "TLS negotiation started for %s...", origin.type);
origin.secure = false;
else
- -- FIXME: What reply?
origin.log("warn", "Attempt to start TLS, but TLS is not available on this %s connection", origin.type);
origin.log("warn", "Attempt to start TLS, but TLS is not available on this %s connection", origin.type);
+ (origin.sends2s or origin.send)(st.stanza("failure", { xmlns = xmlns_starttls }));
+ origin:close();
end
return true;
end);
end
return true;
end);