diff options
author | Kim Alvefur <zash@zash.se> | 2019-03-11 13:00:51 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-03-11 13:00:51 +0100 |
commit | 2bc176f1d072da9404436a40581745033d1e41b6 (patch) | |
tree | dd2e536584dca2521bced9dcca3634edb996862d /net/server_select.lua | |
parent | a08b6d8226ab4f2fe5358f664990e245db01b9a6 (diff) | |
download | prosody-2bc176f1d072da9404436a40581745033d1e41b6.tar.gz prosody-2bc176f1d072da9404436a40581745033d1e41b6.zip |
net.server: Only add alternate SNI contexts if at least one is provided
Fixes use of <starttls/> when a client sends SNI, which would send no certificate otherwise.
Diffstat (limited to 'net/server_select.lua')
-rw-r--r-- | net/server_select.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/server_select.lua b/net/server_select.lua index b52cc6d7..4b156409 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -637,7 +637,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport if socket.sni then if self.servername then socket:sni(self.servername); - elseif self.server() and self.server().hosts then + elseif self._server and type(self._server.hosts) == "table" and next(self._server.hosts) ~= nil then socket:sni(self.server().hosts, true); end end |