From 0581c684a53345e4c9de5bdb8ce79daa96d4751e Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 2 Dec 2023 17:52:53 +0100 Subject: [PATCH] ng: Fix bug that would create a VirtualHost"" Seems * in patterns behave differently before Lua 5.3 Thanks to tarneo for reporting this issue --- ng/configs/prosody-0.11.cfg.lua | 2 +- ng/configs/prosody-0.12.cfg.lua | 2 +- ng/configs/prosody-trunk.cfg.lua | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ng/configs/prosody-0.11.cfg.lua b/ng/configs/prosody-0.11.cfg.lua index eb38627..3297d5a 100644 --- a/ng/configs/prosody-0.11.cfg.lua +++ b/ng/configs/prosody-0.11.cfg.lua @@ -16,7 +16,7 @@ local function _split(s, sep) if not s then return nil; end sep = sep or ","; local parts = {}; - for part in s:gmatch("[^"..sep.."]*") do + for part in s:gmatch("[^"..sep.."]+") do parts[#parts+1] = part; end return parts; diff --git a/ng/configs/prosody-0.12.cfg.lua b/ng/configs/prosody-0.12.cfg.lua index 97988e6..15658f1 100644 --- a/ng/configs/prosody-0.12.cfg.lua +++ b/ng/configs/prosody-0.12.cfg.lua @@ -16,7 +16,7 @@ local function _split(s, sep) if not s then return nil; end sep = sep or ","; local parts = {}; - for part in s:gmatch("[^"..sep.."]*") do + for part in s:gmatch("[^"..sep.."]+") do parts[#parts+1] = part; end return parts; diff --git a/ng/configs/prosody-trunk.cfg.lua b/ng/configs/prosody-trunk.cfg.lua index 97988e6..15658f1 100644 --- a/ng/configs/prosody-trunk.cfg.lua +++ b/ng/configs/prosody-trunk.cfg.lua @@ -16,7 +16,7 @@ local function _split(s, sep) if not s then return nil; end sep = sep or ","; local parts = {}; - for part in s:gmatch("[^"..sep.."]*") do + for part in s:gmatch("[^"..sep.."]+") do parts[#parts+1] = part; end return parts;