qb-core icon indicating copy to clipboard operation
qb-core copied to clipboard

FIX: Special characters in player name causes SQL error

Open 1B0Y opened this issue 1 year ago • 3 comments

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

  • [x ] I have personally loaded this code into an updated qbcore project and checked all of its functionality.
  • [x ] My code fits the style guidelines.
  • [ x] My PR fits the contribution guidelines.

1B0Y avatar Jan 17 '24 21:01 1B0Y

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

github-actions[bot] avatar Mar 18 '24 15:03 github-actions[bot]

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

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

TheNeo2k avatar Mar 25 '24 05:03 TheNeo2k

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

1B0Y avatar Apr 10 '24 17:04 1B0Y