Project

General

Profile

Emulator Issues #9391

Controller Profile naming doesn't filter out characters with special meanings

Added by Pikachu025 over 4 years ago. Updated almost 2 years ago.

Status:
Accepted
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

Open up the Emulated Wiimote config window, type a relative filepath into the Profile box, and hit Save. The window will save the profile, but can't find the created file so it looks like it just disappears.

Examples:
Type "a/b" and hit Save. Profile gets saved as "[userdir]\Config\Profiles\Wiimote\a\b.ini", creating the "a" directory, but the file is not displayed in the dropdown.
Type "../../Dolphin" and hit Save. Profile gets saved as "[userdir]\Config\Dolphin.ini", overwriting the main Dolphin config file.

I recommend just disallowing paths.

On this note, typing a name that has characters that are illegal in the filesystem doesn't save anything but doesn't display an error either.


Related issues

Has duplicate Emulator - Emulator Issues #11258: Qt/MappingWindow: Controller profile names containing asterisks cause problemsDuplicate

History

#1 Updated by JosJuice over 3 years ago

  • Status changed from New to Accepted

#2 Updated by JosJuice over 2 years ago

  • Has duplicate Emulator Issues #11258: Qt/MappingWindow: Controller profile names containing asterisks cause problems added

#3 Updated by JosJuice over 2 years ago

  • Subject changed from Controller Profile selection allows relative file paths. to Controller Profile naming doesn't filter out characters with special meanings

#4 Updated by Billiard26 almost 2 years ago

  • Assignee set to Billiard26

The only thing stopping me from implementing this is deciding on which special characters to disallow.
"Special" is OS-specific.

#5 Updated by Pikachu025 almost 2 years ago

The alternative, which might be a bit more safe in general, would be to disconnect the name of the profile and the name of the file on disk. Just name the files something generic and place the actual name within the file. Dunno if that can be done in a backwards-compatible way though.

#6 Updated by Billiard26 almost 2 years ago

Yeah. That could be done and backwards compatibility would be feasible.

Also available in: Atom PDF