Bug 424623 - Unicode characters in category names can lead to ambiguities
Summary: Unicode characters in category names can lead to ambiguities
Status: REPORTED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: XML backend (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-24 23:34 UTC by Johannes Zarl-Zierl
Modified: 2020-07-24 23:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Zarl-Zierl 2020-07-24 23:34:30 UTC
SUMMARY
Non-ascii characters in XML attribute names need to be escaped. This is done in the method FileWriter::escape().
Unfortunately, this function is not fully unicode aware, leading to multiple code points being escaped to the same value. E.g. both "😃" and "⌘" are escaped as "_.0". This could lead to ambiguities if two category names just differ by one character that is mapped to "_.0".

ADDITIONAL INFORMATION
Some information on the issue can be found in the commit message for commit ac5370fb2492477606587278899df2300043c75b.