changeset 13913:2f754817bf4b 13.0

util.sslconfig: Fix error when applying ssl={[port]=...} An error due to the key being numeric and thus not having the meta-methods Introduced in 2ee27587fec7 Fixes #1948 Thanks Andronicus
author Kim Alvefur <zash@zash.se>
date Mon, 14 Jul 2025 16:42:59 +0200
parents 17b5a10bd9c9
children 1bc4e7ab964c 9a69918b5e63
files util/sslconfig.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/sslconfig.lua	Wed Jun 18 15:02:02 2025 +0200
+++ b/util/sslconfig.lua	Mon Jul 14 16:42:59 2025 +0200
@@ -120,7 +120,7 @@
 	if type(new) == "table" then
 		for field, value in pairs(new) do
 			-- exclude keys which are internal to the config builder
-			if field:sub(1, 1) ~= "_" then
+			if type(field) == "string" and field:sub(1, 1) ~= "_" then
 				(handlers[field] or rawset)(config, field, value);
 			end
 		end