mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 00:01:20 +00:00
d26455349024de05551967d699705010da5e9a7e
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.
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 |
Description
Languages
JavaScript
62.3%
Lua
34.8%
TypeScript
1.2%
HTML
0.8%
CSS
0.7%
Other
0.2%