Prosody IM trunk


changeset 6be890ca492e 0.11

mod_dialback: Use correct host for certificate check (fixes #1381)

author
Kim Alvefur
date
parents
children
files

1 files changed, 1 insertions(+), 2 deletions(-)

↓ Download patch

--- a/plugins/mod_dialback.lua	Wed May 12 14:00:53 2021 +0100
+++ b/plugins/mod_dialback.lua	Sun Jun 23 16:16:26 2019 +0200
@@ -25,8 +25,7 @@
 local dwd = module:get_option_boolean("dialback_without_dialback", false);
 
 --- Helper to check that a session peer's certificate is valid
-function check_cert_status(session)
-	local host = session.direction == "outgoing" and session.to_host or session.from_host
+function check_cert_status(session, host)
 	local conn = session.conn:socket()
 	local cert
 	if conn.getpeercertificate then