aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-06-23 16:16:26 +0200
committerKim Alvefur <zash@zash.se>2019-06-23 16:16:26 +0200
commit1cd5049c778cd54f88eb349411ccebd36af5ab3e (patch)
tree07485b372adb4990ec294d670eaf01f634f685a5 /plugins
parent0a3d7966232970cb9c8076d693db0a7fef69116d (diff)
downloadprosody-1cd5049c778cd54f88eb349411ccebd36af5ab3e.tar.gz
prosody-1cd5049c778cd54f88eb349411ccebd36af5ab3e.zip
mod_dialback: Use correct host for certificate check (fixes #1381)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_dialback.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua
index 38d16b60..c81484a9 100644
--- a/plugins/mod_dialback.lua
+++ b/plugins/mod_dialback.lua
@@ -25,8 +25,7 @@ local dialback_secret = sha256_hash(module:get_option_string("dialback_secret",
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