Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insecure server events allow anyone to spawn in free money #12

Open
j-mie opened this issue May 24, 2020 · 1 comment
Open

Insecure server events allow anyone to spawn in free money #12

j-mie opened this issue May 24, 2020 · 1 comment

Comments

@j-mie
Copy link

j-mie commented May 24, 2020

RegisterServerEvent('esx_vangelico_robbery:gioielli')
AddEventHandler('esx_vangelico_robbery:gioielli', function()
	local xPlayer = ESX.GetPlayerFromId(source)
	xPlayer.addInventoryItem('jewels', math.random(Config.MinJewels, Config.MaxJewels))
end)

RegisterServerEvent('lester:vendita')
AddEventHandler('lester:vendita', function()

	local _source = source
	local xPlayer = ESX.GetPlayerFromId(_source)
	local reward = math.floor(Config.PriceForOneJewel * Config.MaxJewelsSell)

	xPlayer.removeInventoryItem('jewels', Config.MaxJewelsSell)
	xPlayer.addMoney(reward)
end)

Anyone can fire these events without it even checking if they're started a robbery, leading to free money and ruined economies.

@north77
Copy link

north77 commented May 28, 2020

how do we fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants