aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-03-22 21:13:09 +0100
committerKim Alvefur <zash@zash.se>2020-03-22 21:13:09 +0100
commit1724e9a271649aad3ed5559b61c24d656a7e5073 (patch)
tree34537ef426e6f55fa507b93b2479506d3865da93 /plugins
parentde1efbb3dfb4a103abbae1040261751ef7e4366a (diff)
parent65a654d7266a768a3af6863eb1cc0f60c6ea8d77 (diff)
downloadprosody-1724e9a271649aad3ed5559b61c24d656a7e5073.tar.gz
prosody-1724e9a271649aad3ed5559b61c24d656a7e5073.zip
Merge 0.11->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_admin_telnet.lua13
-rw-r--r--plugins/mod_storage_sql.lua1
2 files changed, 9 insertions, 5 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 4dc32e47..2efd424c 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -596,9 +596,14 @@ local function tls_info(session, line)
common_info(session, line);
if session.secure then
local sock = session.conn and session.conn.socket and session.conn:socket();
- if sock and sock.info then
- local info = sock:info();
- line[#line+1] = ("(%s with %s)"):format(info.protocol, info.cipher);
+ if sock then
+ local info = sock.info and sock:info();
+ if info then
+ line[#line+1] = ("(%s with %s)"):format(info.protocol, info.cipher);
+ else
+ -- TLS session might not be ready yet
+ line[#line+1] = "(cipher info unavailable)";
+ end
if sock.getsniname then
local name = sock:getsniname();
if name then
@@ -611,8 +616,6 @@ local function tls_info(session, line)
line[#line+1] = ("(ALPN:%q)"):format(proto);
end
end
- else
- line[#line+1] = "(cipher info unavailable)";
end
else
line[#line+1] = "(insecure)";
diff --git a/plugins/mod_storage_sql.lua b/plugins/mod_storage_sql.lua
index accfa2df..21556715 100644
--- a/plugins/mod_storage_sql.lua
+++ b/plugins/mod_storage_sql.lua
@@ -649,6 +649,7 @@ local function create_table(engine) -- luacheck: ignore 431/engine
Index { name="prosodyarchive_index", unique = engine.params.driver ~= "MySQL", "host", "user", "store", "key" };
Index { name="prosodyarchive_with_when", "host", "user", "store", "with", "when" };
Index { name="prosodyarchive_when", "host", "user", "store", "when" };
+ Index { name="prosodyarchive_sort", "host", "user", "store", "sort_id" };
};
engine:transaction(function()
ProsodyArchiveTable:create(engine);