diff options
author | Kim Alvefur <zash@zash.se> | 2019-10-12 20:07:50 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-10-12 20:07:50 +0200 |
commit | ec277db6ab17f16c5cb7b8a38b16d32db111868a (patch) | |
tree | 088ccbbe0ba2d12969c9b194f2c20fc709cb5dc1 | |
parent | 67e6ee1d8365ade2138454d668e7bbbe169290d2 (diff) | |
download | prosody-ec277db6ab17f16c5cb7b8a38b16d32db111868a.tar.gz prosody-ec277db6ab17f16c5cb7b8a38b16d32db111868a.zip |
net.server_epoll: Fix to get remote IP on direct TLS connections
A Direct TLS connection (eg HTTPS) gets turned into a LuaSec handle
before the :updatenames call done in the :connect method. LuaSec does
not expose the :getpeername and :getsockname methods, so the addresses
remain obscured, making debugging trickier since the actual IP addrerss
connected to does not show up.
-rw-r--r-- | net/server_epoll.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 3b134312..7a414901 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -521,6 +521,7 @@ function interface:tlshandskake() self._tls = true; self:debug("Starting TLS now"); self:del(); + self:updatenames(); -- Can't getpeer/sockname after wrap() local ok, conn, err = pcall(luasec.wrap, self.conn, self.tls_ctx); if not ok then conn, err = ok, conn; |