Bug 424623

Summary: Unicode characters in category names can lead to ambiguities
Product: [Applications] kphotoalbum Reporter: Johannes Zarl-Zierl <johannes>
Component: XML backendAssignee: KPhotoAlbum Bugs <kphotoalbum-bugs-null>
Status: REPORTED ---    
Severity: minor    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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.