cloudnode-pro / BankAccounts

A Minecraft economy plugin that enables players to hold multiple bank accounts.
https://modrinth.com/plugin/bankaccounts
GNU General Public License v3.0
7 stars 3 forks source link

Improved user text input sanitisation and extended supported chars in DB #122

Closed zefir-git closed 5 months ago

zefir-git commented 5 months ago

Alters table columns to change the collation from latin1_general to utf8mb3_general to enable the use of foreign languages.

Validates that strings a user provides for such columns do not exceed codepoint 0xFFFF which is the maximum supported by utf8mb3. Additional characters can be excluded with configurable RegEx:

https://github.com/cloudnode-pro/BankAccounts/blob/308dfcc4eeee071efb6c56bbd3e6e3374ff9789e/src/main/resources/config.yml#L260-L264

Descriptions that exceed the column string length limit will be cut and (a single character) will be appended. This should prevent DB errors while also indicating to users that the description was cut short.

zefir-git commented 5 months ago

image image image image