Skip to content

fix(server/events): capture identifiers before async user lookup - #776

Merged
ChatDisabled merged 1 commit into
mainfrom
fix/issue-772
Sep 26, 2026
Merged

ChatDisabled merged 1 commit into
mainfrom
fix/issue-772

Conversation

@ChatDisabled

Copy link
Copy Markdown
Member

Description

onPlayerConnecting read license synchronously but only called getIdentifiers(src) after awaiting storage.fetchUserByIdentifier. If another playerConnecting handler rejects the connection during that await, the temporary source can already be invalid, so the snapshot only contains username and createUser inserts a row with NULL license/license2/fivem/discord. Those rows are never matched again, so every retried rejected connection adds another.

The identifier snapshot is now taken at the same point as license, before the deferral yields, so a created row always carries the identifiers it is looked up by.

Related Issues

Fixes #772

Type of Change

  • Bug fix

Testing

Code-path review of onPlayerConnecting, getIdentifiers, createUser and Login; luacheck reports no new warnings. Not tested on a live server.

@ChatDisabled
ChatDisabled merged commit 3d0163b into main Sep 26, 2026
5 checks passed
@ChatDisabled
ChatDisabled deleted the fix/issue-772 branch September 26, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

playerConnecting can create identifier-less users after another deferral rejects

1 participant