blacklist - fix wrong parsing of reason data

This commit is contained in:
florian 2024-03-16 09:52:54 +01:00
parent 62333a73e3
commit fc817a62e1
No known key found for this signature in database
GPG key ID: 93EE47CC3D061500

View file

@ -355,10 +355,10 @@ end
-- luacheck: ignore 212
function blacklist:get_data(blacklisted)
local data = {}
if blacklisted == "ip" then
if blacklisted:lower() == "ip" then
data["id"] = "ip"
else
local id, value = blacklisted:match("^(.+) (.+)$")
local id, value = blacklisted:match("^(%w+) (.+)$")
if id and value then
id = id:lower()
data["id"] = id