From 0014a768848b25b0720152586e19406e4777dbe7 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Fri, 22 Feb 2019 18:35:18 +0100 Subject: [PATCH] Fixed security vulnerability --- server/main.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 423589ce..347f334d 100644 --- a/server/main.lua +++ b/server/main.lua @@ -285,8 +285,13 @@ RegisterServerEvent('esx_ambulancejob:setDeathStatus') AddEventHandler('esx_ambulancejob:setDeathStatus', function(isDead) local identifier = GetPlayerIdentifiers(source)[1] + if type(isDead) ~= 'boolean' then + print(('esx_ambulancejob: %s attempted to parse something else than a boolean to setDeathStatus!'):format(identifier)) + return + end + MySQL.Sync.execute('UPDATE users SET is_dead = @isDead WHERE identifier = @identifier', { ['@identifier'] = identifier, - ['@isDead'] = isDead + ['@isDead'] = isDead }) end)