Diff

mod_client_management/mod_client_management.lua @ 5600:6d0574bfbf5d

mod_client_management: Include software version in table (when known) Showing software versions could be useful for statistical reasons, e.g. determining how quickly (or not) users upgrade, but most importantly for revoking vulnerable clients versions in case of a security issue.
author Kim Alvefur <zash@zash.se>
date Thu, 13 Jul 2023 23:26:02 +0200
parent 5599:b43ff0302204
child 5601:e9af6abf2b1e
line wrap: on
line diff
--- a/mod_client_management/mod_client_management.lua	Thu Jul 13 23:24:23 2023 +0200
+++ b/mod_client_management/mod_client_management.lua	Thu Jul 13 23:26:02 2023 +0200
@@ -426,7 +426,13 @@
 				key = "user_agent";
 				width = "1p";
 				mapper = function(user_agent)
-					return user_agent and user_agent.software;
+					if user_agent and user_agent.software then
+						if user_agent.software_version then
+							return user_agent.software .. "/" .. user_agent.software_version;
+						else
+							return user_agent.software;
+						end
+					end
 				end;
 			};
 			{