Ignore badly formatted services (#1228)

This commit is contained in:
Tim Wilkinson 2024-05-29 16:44:11 -07:00 committed by GitHub
parent 4717ab051c
commit da71e6e26b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 42 additions and 40 deletions

View File

@ -184,6 +184,7 @@ local function get(validate)
for _, service in ipairs(services) for _, service in ipairs(services)
do do
local proto, hostname, port, path = service:match("^(%w+)://([%w%-%.]+):(%d+)(.*)|...|[^|]+$") local proto, hostname, port, path = service:match("^(%w+)://([%w%-%.]+):(%d+)(.*)|...|[^|]+$")
if proto then
local vs = vstate[hostname:lower()] local vs = vstate[hostname:lower()]
if not vs or vs > now or dmz_mode == "0" then if not vs or vs > now or dmz_mode == "0" then
if port == "0" then if port == "0" then
@ -232,6 +233,7 @@ local function get(validate)
end end
end end
end end
end
-- Generate new hosts and services as long as they're valid -- Generate new hosts and services as long as they're valid
local old_hosts = hosts local old_hosts = hosts