Save template: allows to enter directory names, even ../

Bug #1789010 reported by Hachmann
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Undecided
Christophe Lebras

Bug Description

When I save the current document as template, I can enter things like:

red/rectangle.svg

and Inkscape creates a directory named red in the templates directory.

../red/rectangle

is even written into the wrong directory.

Please sanitize user input before saving as file names!

(I'd even suggest to convert the file name to ASCII with underscores... that way, file names will be universally compatible... but that might be too much)

(0.92+devel (14d07e6, 2018-08-17) on Linux Mint 18.3)

Hachmann (marenhachmann)
description: updated
Hachmann (marenhachmann)
description: updated
Revision history for this message
Christophe Lebras (christophelebras) wrote :

https://gitlab.com/inkscape/inkscape/merge_requests/315

Sanitize file name according to
Windows's file naming conventions (Windows is more restrictive than Unix-like operating systems).
Forbidden characters are converted with percent encoding, (i.e. ":" is replaced by "%3a").

Revision history for this message
Hachmann (marenhachmann) wrote :

Thank you for getting to this so quickly!!!

I wonder if this functionality doesn't already exist in Inkscape or some of the libraries it uses... but not sure. I'm not a dev :)

Revision history for this message
Christophe Lebras (christophelebras) wrote :

> I wonder if this functionality doesn't already exist in Inkscape or some of the libraries it
> uses... but not sure. I'm not a dev :)

Yes, it does. It's corrected now:

https://gitlab.com/inkscape/inkscape/merge_requests/315#note_97076560

Revision history for this message
Hachmann (marenhachmann) wrote :

Thank you very much, Christophe!

As I cannot assign anyone but myself to a bug report here, could you assign yourself, Christophe, and mark this as 'Fix released'?

Changed in inkscape:
assignee: nobody → Christophe Lebras (christophelebras)
status: New → Fix Committed
status: Fix Committed → Fix Released
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.