Comparison

plugins/mod_s2s/mod_s2s.lua @ 10459:7456eaa83b15

mod_s2s: Prevent unhandled stanza handler from complaining about stream features on aborted connections I have no idea why I wrote return false in e5945fb5b71f
author Kim Alvefur <zash@zash.se>
date Fri, 29 Nov 2019 18:15:23 +0100
parent 10457:0c44090cb168
child 10465:09697a673015
comparison
equal deleted inserted replaced
10458:602dd1e2f399 10459:7456eaa83b15
194 session.log("warn", "Encrypted server-to-server communication is required but was not offered by %s", session.to_host); 194 session.log("warn", "Encrypted server-to-server communication is required but was not offered by %s", session.to_host);
195 session:close({ 195 session:close({
196 condition = "policy-violation", 196 condition = "policy-violation",
197 text = "Encrypted server-to-server communication is required but was not offered", 197 text = "Encrypted server-to-server communication is required but was not offered",
198 }, nil, "Could not establish encrypted connection to remote server"); 198 }, nil, "Could not establish encrypted connection to remote server");
199 return false; 199 return true;
200 elseif not session.dialback_verifying then 200 elseif not session.dialback_verifying then
201 session.log("warn", "No SASL EXTERNAL offer and Dialback doesn't seem to be enabled, giving up"); 201 session.log("warn", "No SASL EXTERNAL offer and Dialback doesn't seem to be enabled, giving up");
202 session:close({ 202 session:close({
203 condition = "unsupported-feature", 203 condition = "unsupported-feature",
204 text = "No viable authentication method offered", 204 text = "No viable authentication method offered",
205 }, nil, "No viable authentication method offered by remote server"); 205 }, nil, "No viable authentication method offered by remote server");
206 return false; 206 return true;
207 end 207 end
208 end, -1); 208 end, -1);
209 end 209 end
210 210
211 -- Stream is authorised, and ready for normal stanzas 211 -- Stream is authorised, and ready for normal stanzas