mirror of
https://notabug.org/TenPlus1/protector.git
synced 2024-12-05 03:33:48 +01:00
sanitize member names (thanks hysteria)
This commit is contained in:
parent
dbb049726e
commit
a5a603be6c
5
init.lua
5
init.lua
@ -109,6 +109,11 @@ end
|
||||
-- add player name to table as member
|
||||
local add_member = function(meta, name)
|
||||
|
||||
-- Validate player name for MT compliance
|
||||
if name ~= string.match(name, "[%w_-]+") then
|
||||
return
|
||||
end
|
||||
|
||||
-- Constant (20) defined by player.h
|
||||
if name:len() > 25 then
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user