Comparison

plugins/mod_admin_shell.lua @ 11945:142b9c4010fe

mod_admin_shell: Reduce width of 'Security' column (thanks Link Mauve) Tricky to represent "secure, but no details" in short enough space.
author Kim Alvefur <zash@zash.se>
date Fri, 26 Nov 2021 11:39:13 +0100
parent 11943:cf47834d3698
child 11946:c0a01e5f5656
comparison
equal deleted inserted replaced
11944:8b5e646dfaa6 11945:142b9c4010fe
724 end; 724 end;
725 }; 725 };
726 secure = { 726 secure = {
727 title = "Security"; 727 title = "Security";
728 key = "conn"; 728 key = "conn";
729 width = 11; 729 width = 8;
730 mapper = function(conn, session) 730 mapper = function(conn, session)
731 if not session.secure then return "insecure"; end 731 if not session.secure then return "insecure"; end
732 if not conn or not conn:ssl() then return "secure" end 732 if not conn or not conn:ssl() then return "secure" end
733 local sock = conn and conn:socket(); 733 local sock = conn and conn:socket();
734 if not sock then return "unknown TLS"; end 734 if not sock then return "secure"; end
735 local tls_info = sock.info and sock:info(); 735 local tls_info = sock.info and sock:info();
736 return tls_info and tls_info.protocol or "unknown TLS"; 736 return tls_info and tls_info.protocol or "secure";
737 end; 737 end;
738 }; 738 };
739 encryption = { 739 encryption = {
740 title = "Encryption"; 740 title = "Encryption";
741 width = 30; 741 width = 30;