Skip to content

Commit

Permalink
fix(server/player): license login check passes for both license as we…
Browse files Browse the repository at this point in the history
…ll as license2
  • Loading branch information
Manason committed Dec 4, 2024
1 parent ab78c29 commit 6b05870
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions server/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 6b05870

Please sign in to comment.