comparison mod_s2s_auth_compat/mod_s2s_auth_compat.lua @ 944:21e81fcb8896

mod_s2s_auth_compat: Workaround for Openfire doing EXTERNAL without proper stream headers
author Kim Alvefur <zash@zash.se>
date Mon, 01 Apr 2013 16:08:21 +0200
parents
children
comparison
equal deleted inserted replaced
943:a8203db13ca2 944:21e81fcb8896
1 -- COMPAT for Openfire sending stream headers without to or from.
2
3 module:set_global();
4
5 module:hook("s2s-check-certificate", function(event)
6 local session, host = event.session, event.host;
7 if not event.host then
8 (session.log or module._log)("warn", "Invalid stream header, certificate will not be trusted")
9 session.cert_chain_status = "invalid"
10 return true
11 end
12 end, 100);