Skip to content

Commit

Permalink
Fix a vulnerability regarding character deletion
Browse files Browse the repository at this point in the history
This will disallow cheaters (anyone with a LUA script executor) from deleting their characters, bypassing the `Config.EnableDeleteButton` setting.
  • Loading branch information
Troughy authored Sep 30, 2024
1 parent 5e8ac7b commit 772f4f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ end)

RegisterNetEvent('qb-multicharacter:server:deleteCharacter', function(citizenid)
local src = source
if not Config.EnableDeleteButton then return end
QBCore.Player.DeleteCharacter(src, citizenid)
TriggerClientEvent('QBCore:Notify', src, Lang:t("notifications.char_deleted") , "success")
end)
Expand Down

0 comments on commit 772f4f5

Please sign in to comment.