Editor: Map saving can contain critical characters

Bug #1841177 reported by kaputtnik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Critical
Unassigned

Bug Description

We have a check for safe filenames when saving a map. This check can be circumvented by:

1. Open editor
2. Open map options and give a non suspicious name (there is another bug here: The OK button is initially grayed out. If you delete ' Name' and write ' Name' again, the OK button is not grayed out)
3. Click OK
4. Open Save map menu
5. Click on Map Options
6. Add some bad characters to the map name, e.g.: \/,`?
7. Click OK

Result: The Filename in the Save Map screen has now the bad characters and the OK button is not grayed out -> Saving possible

If you enter the editbox of the filename (in Save Map screen) and delete the last bad character, the OK button get disabled.

When entering an exclamation mark (!) in step 6, the behavior is as expected: The OK button is disabled. I guess this is due my file system, which allows all characters except the exclamation mark.

GunChleoc (gunchleoc)
tags: added: filesystem ui
Changed in widelands:
milestone: none → build21-rc1
Revision history for this message
Toni Förster (stonerl) wrote :
Revision history for this message
GunChleoc (gunchleoc) wrote :

We already have a filename check in place for saving a map, but it is only performed when typing in the editbox.

We should also double-check if we are catching those when saving a game.

IMO the internet gaming check is too restrictive here, because it excludes most languages other than English for filenames, which is not necessary.

Revision history for this message
GunChleoc (gunchleoc) wrote :

We also need to sanitize < and >.

Changed in widelands:
status: New → Confirmed
importance: Undecided → Critical
tags: added: lowhangingfruit
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.