News for hackers. Stuff that matters.
Re:Inkscape 1.1 by crazygringo on Monday May 24, 2021 @07:30PM (#27270939)
I installed Inkscape the other day to try to rescale and save an simple SVG for the web.

When I took a look at the text saved in the file, I was pretty shocked to discover it saved the entire path of the file in the file.

In other words, it saves a directory structure that could contain your username, the name of the project you're working on, what company you're working for, etc.

Felt like a pretty shocking invasion of privacy to me. When I throw up an SVG on the web, I don't want it to contain potentially personally identifiable information.

Re:Inkscape 1.1 by sirshmooey on Monday May 24, 2021 @07:45PM (#27271048)
Excellent tool for removing all the fluff: https://jakearchibald.github.io/svgomg/
Re:Inkscape 1.1 by FuriouslyAdrift on Tuesday May 25, 2021 @07:39AM (#27275602)
Another great tool is https://exiftool.org/
Re:Inkscape 1.1 by qwerty456127 on Tuesday May 25, 2021 @05:45AM (#27274841)
Nice. But it still is crazy it's put there in the first place. why in the world would it need to?
Re:Inkscape 1.1 by Symbiote on Tuesday May 25, 2021 @05:48AM (#27274863)
It looks like the relevant attribute is:

  inkscape:export-filename="/home/symbiote/Documents/drawing.png"
To get this, create a new drawing and draw a shape. Export the whole drawing as a PNG, then save as an Inkscape SVG.

[1] is a bug report, but only part of the problem seems to have been resolved.

(Tested in this new release.)

[1] https://bugs.launchpad.net/inkscape/+bug/168958

Re:Inkscape 1.1 by colanderman on Monday May 24, 2021 @11:21PM (#27272273)
I haven't upgraded yet, but with 1.0 on macOS, I see a relative path in the sodipodi:docname attribute of the root element (not an absolute path, so either something changed in 1.1 or behavior differs between OSes). This is where you are seeing it correct?

Saving as "Plain SVG" does not include this (or any other sodipodi namespace elements, by design). Not great that the default save format includes this, but FWIW best practice is to save as "Plain SVG" for interoperability.

Re:Inkscape 1.1 by larschdk on Tuesday May 25, 2021 @07:38AM (#27275595)
I feel like the main mistake here is that Inkscape uses the .svg extension for what it basically it's own format. While it is essentially .svg compatible, it includes many extensions and metadata necessary for Inkscape to function. You should really save as optimized or plain .svg before publishing anything made in Inkscape.
Re:Inkscape 1.1 by xsmasher on Tuesday May 25, 2021 @01:56PM (#27280037)
If it saves an absolute path, not a relative one, won't it break when you move the project to another machine? Or even move the containing folder to another location?
Re:Inkscape 1.1 by waiseristy on Monday May 24, 2021 @07:48PM (#27271067)
Preferences -> Input/Output -> SVG output -> Path Data -> Path String format (relative)

Does that do what you want?

Re:Inkscape 1.1 by colanderman on Monday May 24, 2021 @11:15PM (#27272256)
That has nothing to do with filenames. That is referring to the format of linestring paths; whether each point is specified relative to the last.
Re:Inkscape 1.1 by LegitShady on Monday May 24, 2021 @07:51PM (#27271086)
That should be the default but it sounds like it.
Re:Inkscape 1.1 by cies on Tuesday May 25, 2021 @04:33AM (#27274392)
Exactly.
Re:Inkscape 1.1 by asddubs on Tuesday May 25, 2021 @01:03AM (#27272762)
you probably saved it as an inkscape svg instead of an optimized svg. it is a bit confusing, but the former is basically the equivalent to the inkscape-native file format, and the latter will remove things specific to inkscape
Re:Inkscape 1.1 by efortis on Monday May 24, 2021 @08:18PM (#27271281)
How and where did you install it? The .dmg from their site, and Arch's pacman didn't add user metadata to my installations.

You can clear yours:

File -> Document Properties -> Metadata (clear all fields) -> Save as default

===

At any rate, for the web use:

File -> Save As -> Optimized SVG

Re:Inkscape 1.1 by crazygringo on Monday May 24, 2021 @08:51PM (#27271503)
Just the .dmg from their site. No idea why your defaults would be different from mine.

Why is it even a "feature" in the first place? It's not the kind of thing I'd expect to even have to worry about whether it defaulted to on or off.

Re:Inkscape 1.1 by Tagbert on Tuesday May 25, 2021 @11:59AM (#27278511)
Inkscape probably treats the source SVG differently than an optimized output SVG and includes additional data to make editing the file better. Other apps use a proprietary format for their source files that contains this additional information and have to export to an open format for output.
Re:Inkscape 1.1 by efortis on Monday May 24, 2021 @09:02PM (#27271566)
Probably for copyright and license. It's a common feature, MS Office documents include even more metadata, such as how many times the file has been saved.
Re:Inkscape 1.1 by crazygringo on Monday May 24, 2021 @09:07PM (#27271590)
My problem isn't with quantity of metadata. It's with personally-identifying data. And I can't imagine what the filepath could ever have to do with copyright or license.

I don't see how this is a common feature at all.

Re:Inkscape 1.1 by efortis on Monday May 24, 2021 @09:13PM (#27271631)
The only way I can reproduce your scenario is by inserting an image using "Link" instead of "Embed".

Other than that, was it part of the original/downloaded file?

Re:Inkscape 1.1 by mattkrause on Monday May 24, 2021 @09:13PM (#27271630)
You can include links to other resources (e.g., an image) in an SVG file. Perhaps it's meant to help resolve those paths?
Re:Inkscape 1.1 by efortis on Monday May 24, 2021 @10:55PM (#27272163)
Sorry I thought you were worrying about your PII and the filepath as two different things.
Re:Inkscape 1.1 by lucideer on Tuesday May 25, 2021 @08:37AM (#27276084)
> pretty shocking

Inkscape shouldn't be including this, but just an fyi since you say you were shocked by this: many apps include such metadata in their default save formats.

The main distinction with Inkscape is that most apps have a proprietary save format which you are less likely to publish publicly. Inkscape's use of an open standard for their default metadata-rich save format means that metadata often gets published.

Still, I do think the trove of metadata many apps leave in their files is probably unnecessary and should definitely be addressed (in all apps, including Inkscape).

Re:Inkscape 1.1 by nerdponx on Monday May 24, 2021 @07:54PM (#27271106)
This is the exact same problem that arose with the Rust compiler recently. At least it can be turned off in Inkscape. Such a weird default.
Re:Inkscape 1.1 by vyuh on Tuesday May 25, 2021 @07:52AM (#27275713)
I agree, this can be shocking for many casual users. I think there is an option to save a "plain SVG" as opposed to "inkscape SVG". Does "plain SVG" also include such information?
Re:Inkscape 1.1 by prokoudine on Tuesday May 25, 2021 @12:29PM (#27278914)
As soon as you export your project, Inkscape retains the path to the exported file so that you could overwrite that file when exporting whenever you reopen that project rather than going once again through the whole process of pointing the program to the right folder and submitting output file name.

How is any of this a shocker?

Re:Inkscape 1.1 by amelius on Tuesday May 25, 2021 @07:26AM (#27275506)
Always run your files through strings before sending to the web.
Re:Inkscape 1.1 by mmerlin on Wednesday May 26, 2021 @04:47PM (#27295879)
Can you elaborate? I googled variations of "run files through strings" and this link is the only thing I could find but still unclear

https://docs.microsoft.com/en-us/sysinternals/downloads/stri...

Re:Inkscape 1.1 by char8 on Monday May 24, 2021 @07:56PM (#27271121)
lord thanks for mentioning this.
Re:Inkscape 1.1 by Jermaine_Jabi on Tuesday May 25, 2021 @10:02AM (#27276857)
Does it do that when you save/export for web?
Re:Inkscape 1.1 by aliswe on Tuesday May 25, 2021 @04:27PM (#27282163)
If Im not mistaken Blender does this as well?