qbcore-framework / qb-banking

Banking System For QB-Core
GNU General Public License v3.0
47 stars 195 forks source link

[BUG] Creating shared accounts doesn't have lower/upper case sensitive. #131

Closed Nikwitz closed 4 months ago

Nikwitz commented 7 months ago

Describe the bug If you create a shared account called 'Shared' and someone afterwards create an account called 'shared' it will be visible in the banking list until you restart your game. The money is taken from your account and you can see them in the account, but it wont be visible after relog / server restart because it doesn't create it in the database.

To Reproduce

  1. Create an account named 'Shared' and it will be visible and inserted into the database correctly.
  2. Create an account named 'shared' and it will be visible and not inserted into the database because the name has to be unique.

Expected behavior The expected behavior would be that you get an error message that the name is already taken.

Questions (please complete the following information):

ROLLINDOSES commented 7 months ago

do you by chance know what the item is called

Nikwitz commented 7 months ago

do you by chance know what the item is called

Which item?

scrumbee commented 6 months ago

Just go in server.lua line 25 and change part of the related code to this:

local normalizedAccountName = string.lower(accountName) if Accounts[normalizedAccountName] then return false end

github-actions[bot] commented 4 months ago

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