luci-app-passwall: sync upstream

last commit: af556d246d
This commit is contained in:
actions 2024-05-31 15:30:05 +08:00
parent 9a0719f17e
commit bf46b250bd

View File

@ -144,7 +144,7 @@ ip_list.wrap = "off"
ip_list.validate = function(self, value)
local ipmasks= {}
value = value:gsub("^%s+", ""):gsub("%s+$","\n"):gsub("\r\n","\n"):gsub("[ \t]*\n[ \t]*", "\n")
string.gsub(value, '[^' .. "\r\n" .. ']+', function(w) table.insert(ipmasks, w) end)
string.gsub(value, "[^\r\n]+", function(w) table.insert(ipmasks, w) end)
for index, ipmask in ipairs(ipmasks) do
if ipmask:find("geoip:") and ipmask:find("geoip:") == 1 and not ipmask:find("%s") then
elseif ipmask:find("ext:") and ipmask:find("ext:") == 1 and not ipmask:find("%s") then