Selt d264553490 fix(es_extended/shared): return false instead of raising on invalid utf8
ESX.IsValidLocaleString only checks that the argument is a string, but a Lua
string is a byte array and need not be valid utf8. utf8.codes raises on a
malformed sequence rather than stopping, so the function throws where its
annotation promises a boolean.

esx_identity feeds raw client input into it through checkNameFormat, so a
modified client sending a lone 0xFF byte as a first name aborts the
registerIdentity callback before cb() runs. The client is left waiting on a
promise that never resolves and cannot get past the identity screen, and it
can be repeated at will.

utf8.len returns nil instead of raising, so it is enough to reject the string
up front.

Verified on artifact 25770: "Jo\255hn" used to raise "invalid UTF-8 code" and
now returns false. "John" still returns true, "Jo!hn" still returns false, and
"Jo3hn" with allowDigits still returns true.
2026-07-27 16:17:28 +02:00
2025-07-28 11:38:03 +02:00
2025-10-01 22:16:13 -05:00
2026-05-25 12:12:51 +02:00

ESX Legacy

Discord - Website - Documentation

Want more resources? You can browse the Cfx.re Releases board for more!

ESX is the leading framework, trusted by over 12,000 communities to provide the highest quality roleplay servers on FiveM


💗 Supporters

Interested in helping us? Take a look at our patreon

We would like to sincerely thank the following donors who helped fund the development of ESX.
Mohamad Buhamad - Michael Hein - RoadToSix - Montree Narathong
Saydoon - Muhannad alyamani - iSentrie - Wecity - Samuel Nicol
Kyle McShea - Artin - Mathias Christoffersen - Jaylan Yilmaz - Callum
CONGRESS KW - Michael Hein - Smery sitbon - daZepelin - CMF Community

S
Description
Official Repo For core resources for esx-legacy
Readme 49 MiB
Languages
JavaScript 62.3%
Lua 34.8%
TypeScript 1.2%
HTML 0.8%
CSS 0.7%
Other 0.2%