mirror of
https://github.com/CapsAdmin/wowozela.git
synced 2025-03-04 03:13:27 -05:00
Sanity check sample indexes to prevent malicious behavoir
This commit is contained in:
parent
ea3773efd5
commit
5c2acd509a
@ -201,16 +201,18 @@ if SERVER then
|
||||
|
||||
local newSamples = {}
|
||||
for k,v in pairs(samples) do
|
||||
local newSample = {
|
||||
category = "custom-sample-hidden",
|
||||
owner = ply:EntIndex(),
|
||||
custom = true,
|
||||
path = v[1],
|
||||
name = v[2]
|
||||
}
|
||||
if k > 0 or k <= 10 then
|
||||
local newSample = {
|
||||
category = "custom-sample-hidden",
|
||||
owner = ply:EntIndex(),
|
||||
custom = true,
|
||||
path = v[1],
|
||||
name = v[2]
|
||||
}
|
||||
|
||||
wowozela.KnownSamples[startID + k] = newSample
|
||||
newSamples[startID + k] = newSample
|
||||
wowozela.KnownSamples[startID + k] = newSample
|
||||
newSamples[startID + k] = newSample
|
||||
end
|
||||
end
|
||||
|
||||
net.Start("wowozela_update_samples")
|
||||
|
Loading…
Reference in New Issue
Block a user