Skip to content

Restricts usage of special characters in profile names

Currently, users are not restricted from using any characters in when renaming existing profiles or naming new profiles. This can lead to issues when users use characters in their profile names which are forbidden in the filenames of the underlying file system. This is because the file of a profile is named exactly according to the name of the profile in addition to a ".profile" extension. For example, if a profile named "a/b" is created and '/' is forbidden, the profile file created may be named "ab.profile" instead and upon restarting the application, a profile named "ab" will be found in place of profile "a/b". Another example is if two profiles named "a{b" and "a/b" were created and the underlying file system forbids the use of characters '{' and '/'. This would lead to a single profile file "ab.profile" being created. Upon restarting the application, profiles "a{b" and "a/b" would not be shown. Instead, there would only be one profile "ab" shown.

This change detects if the user is using any common forbidden characters when naming profiles. If forbidden characters are detected, the user is presented with a warning highlighting the forbidden characters which were used and EditProfileDialog::isProfileNameValid returns false.

Merge request reports