Merge branch 'main' into patch-1

This commit is contained in:
worapol.pan.buraphan
2023-01-21 22:10:05 +07:00
committed by GitHub
+2 -1
View File
@@ -417,11 +417,12 @@ end
--- SQL Pattern Matching
function QBCore.Functions.PrepForSQL(source,data,pattern)
data = tostring(data)
local src = source
local player = QBCore.Functions.GetPlayer(src)
local result = string.match(data, pattern)
if not result or string.len(result) ~= string.len(data) then
TriggerEvent('qb-log:server:CreateLog', 'anticheat', 'SQL Injection Attempted', 'red', string.format('%s Attempted a SQL Exploit!', player.PlayerData.license))
TriggerEvent('qb-log:server:CreateLog', 'anticheat', 'SQL Exploit Attempted', 'red', string.format('%s attempted to exploit SQL!', player.PlayerData.license))
return false
end
return true