Page MenuHome GnuPG

98 chars limits on archived filenames for windows (gpgtar)
Closed, WontfixPublic

Description

Reported
https://wald.intevation.org/forum/forum.php?thread_id=1667&forum_id=21&group_id=11

The gpgtar included in Gpg4win 2.3.3 does not accept
filenames over 98 chars.

I'm not sure what a good limit is, but it seems there are real world examples
for longer filenames.

Event Timeline

bernhard set External Link to https://wald.intevation.org/forum/forum.php?thread_id=1667&forum_id=21&group_id=11.Sep 15 2016, 9:30 AM
bernhard set Version to 2.3.3.
bernhard added subscribers: aheinecke, bernhard.

I'm unsure about the compatibility issues with using a higher filename-length
limit.

aheinecke raised the priority of this task from Wishlist to High.Sep 15 2016, 9:49 AM
aheinecke removed a project: Feature Request.
aheinecke added a project: Bug Report.

https://www.gnu.org/software/tar/manual/html_section/tar_68.html gives a good
overview imo.

So yes raising the file name length limit could be problematic with
compatibility and we might have to change more in our implementation to create
formats of a different spec.

From the discussion in the forum it looks like the error was silently discarded
when used in Kleopatra. We need error handling in that case. So I think this is
an Urgent bug as silent discard of archive contents can lead to data loss. So
for me this part is an urgent bug. Actually handling longer filenames is another
issue.

As a sidenote:
Kleopatra already links KArchive for svgz handling so it already contains a good
API for ZIP file creation. I'd like to add that to Kleopatra and make it default
so that the default is not our own error prone tar implementation. (Other tar
implementations also are problematic for windows). In that case we could also
drop the extraction as zip file support is native in the windows file explorer.

And as suggested in the forum entry we should probably also document how to add
7zip support to kleopatra or check for this at runtime and add some 7zip archive
options if it is available.
This should be doable by editing libkleopatrarc but I'd have to check the syntax
myself in the code as its not documented afaik.

Can you create a new issue with the data "loss" part?

As for the default format:
I think we should use and propose a default format that is mostly compatible
over platforms (and robust in the future). tar "posix" seems to be
such a format. Am not sure how this evaluates for karchive or 7zip.

What I meant by "KArchive" is that we already have all that nice archiving code
in Kleopatra already: https://api.kde.org/frameworks/karchive/html/index.html
To work with standard formats like tar / zip / 7zip etc.

This would get us the included platform abstraction through Qt for stuff like
filenames etc. and we wouldn't have to maintain our own implementations for
these archive formats.

ustar is the format introduced by PGP 6; also for Windows. This is the only
reason we use it. PGP users demanded that we support that "pgpzip". We can't
drop it.

@werner, if I understand the description at
https://www.gnu.org/software/tar/manual/html_section/tar_68.html
then ustar would also be able to read "posix" archives.

marcus added a subscriber: marcus.

To remain compatible with PGP6 we are limited to ustar. If you want to support other archive types, archive first and then encrypt/sign the archive.