Skip to content

Commit a7927aa

Browse files
authored
fix(server): missing invtype check (#53)
-> allows users to open inventories by passing the incorrect invType regardless of distance and security checks
1 parent 5442129 commit a7927aa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ local function openInventory(source, invType, data, ignoreSecurityChecks)
231231

232232
if not right then return end
233233

234+
if right.type ~= invType then
235+
DropPlayer(source, 'sussy')
236+
return
237+
end
238+
234239
if not ignoreSecurityChecks and right.groups and not server.hasGroup(left, right.groups) then return end
235240

236241
local hookPayload = {

0 commit comments

Comments
 (0)