fleet
fleet copied to clipboard
Emoji/unicode in team name may cause another team to be overwritten
Fleet version: 4.44.1 Web browser and operating system:
💥 Actual behavior
Creating a new team with emoji in the name overwrites old team instead. https://www.loom.com/share/02b68f30a5e342e19875094b4cc4fbbb?sid=82bc7aa7-432d-4c09-bb28-c396055827f0
We would like to fix this since Dogfood is using emojis in team names.
🧑💻 Steps to reproduce
See video above
🕯️ More info (optional)
Other unicode issues: https://github.com/fleetdm/fleet/issues/16862
🛠️ To fix
- Change team name collation to utf8_bin
- Make sure the team name is normalized before inserting/comparing. This is needed to support unicode equivalence so that we have full unicode support.
- We don't need special collation for sorting since using a special sort is slower, unless there is an obvious issue with sort.
- Optional: While fixing team names, we should also make sure policy names support unicode equivalence.
QA Testplan
Test matrix
- teams and policies
- UI, fleetctl apply, fleetclt gitops
Unicode equivalence, reference: https://en.wikipedia.org/wiki/Unicode_equivalence
- create item named 가
- try to create/update item using equivalent characters, such as: ᄀ + ᅡ (these 2 characters combine to be the same as the single character above) -- this should not work
- try to search for the item using equivalent characters
Emoji support
- create item with emoji(s)
- try to create another item with the same number of emojis -- should be OK
- try to search by emoji
- try skin tone emojis -- does the search behavior make sense?
Sorting
- Ensure item sort is still case insensitive in GUI and API