From 6b0587048a5394c30b0b3afcaa7aedfde350c031 Mon Sep 17 00:00:00 2001 From: Manason Date: Wed, 4 Dec 2024 00:08:49 -0800 Subject: [PATCH] fix(server/player): license login check passes for both license as well as license2 --- server/player.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/player.lua b/server/player.lua index 867abd507..4c6e8c296 100644 --- a/server/player.lua +++ b/server/player.lua @@ -37,15 +37,14 @@ function Login(source, citizenid, newData) return false end - local license = GetPlayerIdentifierByType(source --[[@as string]], 'license2') or GetPlayerIdentifierByType(source --[[@as string]], 'license') - local userId = storage.fetchUserByIdentifier(license) + local license, license2 = GetPlayerIdentifierByType(source --[[@as string]], 'license'), GetPlayerIdentifierByType(source --[[@as string]], 'license2') + local userId = storage.fetchUserByIdentifier(license2 or license) if citizenid then local playerData = storage.fetchPlayerEntity(citizenid) - if playerData and license == playerData.license then + if playerData and (playerData.license == license2 or playerData.license == license) then playerData.userId = userId - - return not not CheckPlayerData(source, playerData) + return CheckPlayerData(source, playerData) ~= nil else DropPlayer(tostring(source), locale('info.exploit_dropped')) logger.log({