From e1f1ddeb35427fc0b9fa902de514c7aa23b57d56 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Sat, 27 Oct 2018 04:10:42 +0000 Subject: [PATCH] lualoader: Always return a proper dictionary for blacklist If module_blacklist isn't specified, we have an empty blacklist; effectively the same as if module_blacklist="" were specified in loader.conf(5). This was reported when switching to a BE that predated the module_blacklist introduction, but the problem is valid all the same and likely to be tripped over in other scenarios. Reported by: bwidawsk MFC after: 3 days --- stand/lua/config.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/lua/config.lua b/stand/lua/config.lua index 8a739d36178..70829c021b7 100644 --- a/stand/lua/config.lua +++ b/stand/lua/config.lua @@ -266,12 +266,12 @@ local function isValidComment(line) end local function getBlacklist() + local blacklist = {} local blacklist_str = loader.getenv('module_blacklist') if blacklist_str == nil then - return nil + return blacklist end - local blacklist = {} for mod in blacklist_str:gmatch("[;, ]?([%w-_]+)[;, ]?") do blacklist[mod] = true end