qbcore-framework / qb-core

FiveM RP Framework Core :muscle:
GNU General Public License v3.0
582 stars 962 forks source link

FIX: Special characters in player name causes SQL error #1073

Closed 1B0Y closed 4 months ago

1B0Y commented 8 months ago

Description

Pull request updates PlayerData.name under server/player.lua line 87, and simply parses everything but alphanumeric. This simply fixes a bug that causes a SQL error being thrown when players use steam name with special characters, such as "ꜱʜᴀᴅʏ𝘅"

Checklist

github-actions[bot] commented 6 months ago

This PR has had 60 days of inactivity & will close within 7 days

TheNeo2k commented 6 months ago

wouldnt; gsub("%S","")

work better? Correct me if I'm wrong, your change gets rid of whitespace?

1B0Y commented 5 months ago

Not in this case, as names such as ꜱʜᴅʏ𝘅_𝘅 (odd font used) would break SQL. The gsub simply removes these