Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"You need tender loving care once a week - so that I can slap you into shape." -- Ellyn Mustard


computers / alt.bbs.synchronet / libarchive disallowed filenames

SubjectAuthor
* libarchive disallowed filenamesNightfox
`* libarchive disallowed filenamesDigital Man
 `- libarchive disallowed filenamesNightfox

1
libarchive disallowed filenames

<62802052.81264.dove_sync@digitaldistortionbbs.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16214&group=alt.bbs.synchronet#16214

  copy link   Newsgroups: alt.bbs.synchronet
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx36.iad.POSTED!not-for-mail
From: night...@DIGDIST.remove-t8c-this (Nightfox)
Subject: libarchive disallowed filenames
Message-ID: <62802052.81264.dove_sync@digitaldistortionbbs.com>
X-Comment-To: Digital Man
Organization: Digital Distortion
Newsgroups: alt.bbs.synchronet
X-FTN-PID: Synchronet 3.19c-Win32 master/254176a6b May 13 2022 MSC 1929
X-FTN-MSGID: 47123.sync@1:103/705 26e61083
X-FTN-CHRS: CP437 2
WhenImported: 20220514143410-0700 c1e0
WhenExported: 20220514144308-0700 c1e0
ExportedFrom: DIGDIST dove_sync 81264
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
X-Gateway: vert.synchro.net [Synchronet 3.19c-Win32 NewsLink 1.113]
Lines: 21
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Sat, 14 May 2022 21:43:17 UTC
Date: Sat, 14 May 2022 14:34:10 -0700
X-Received-Bytes: 2234
 by: Nightfox - Sat, 14 May 2022 21:34 UTC

To: Digital Man
Hi DM,

Just recently I was updating my archive viewer door to use Synchronet's Archive class (if possible) to view/extract archives. I'm using a try/catch with the Archive object, and for a few zip files, I noticed it threw an exception when extracting them due to disallowed filenames inside the zip file. For example, RIPTM154.ZIP is RIPTerm, and the following exception error was given when trying to extract it with Archive:

RIPTM154.ZIP: Error: disallowed filename '3&HALF10.ICN' (after extracting 165 items successfully)

Also, TM421-4.zip is the 4th zip file for Telemate, and Archivew threw an exception with this error:

TM421-4.ZIP: Error: disallowed filename 'AT&T.SCR' (after extracting 20 items
successfully)

I don't seem to have these filenames in any of my configuration files. I checked my text/file.can, but the only filename I have in there is Photo.scr. It seems like Synchronet has a built-in list of disallowed filenames for files inside archives?
I'm guessing those filenames are disallowed because of the & in their names? I imagine they were disallowed because & can be problematic in filenames for some filesystems?

Nightfox

---
■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
--- Synchronet 3.19c-Win32 NewsLink 1.113
* Vertrauen - Riverside County, California - telnet://vert.synchro.net

libarchive disallowed filenames

<6281EA71.47151.sync@vert.synchro.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16228&group=alt.bbs.synchronet#16228

  copy link   Newsgroups: alt.bbs.synchronet
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx09.iad.POSTED!not-for-mail
From: digital....@vert.synchro.net.remove-bgk-this (Digital Man)
Subject: libarchive disallowed filenames
Message-ID: <6281EA71.47151.sync@vert.synchro.net>
X-Comment-To: Nightfox
Organization: Vertrauen
Newsgroups: alt.bbs.synchronet
In-Reply-To: <62802052.81264.dove_sync@digitaldistortionbbs.com>
References: <62802052.81264.dove_sync@digitaldistortionbbs.com>
X-FTN-PID: Synchronet 3.19c-Win32 master/d752fc0eb May 9 2022 MSC 1929
X-FTN-MSGID: 47151.sync@1:103/705 26e7d8a0
X-FTN-REPLY: 47123.sync@1:103/705 26e61083
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
X-Gateway: vert.synchro.net [Synchronet 3.19c-Win32 NewsLink 1.113]
Lines: 50
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Mon, 16 May 2022 06:08:51 UTC
Date: Sun, 15 May 2022 23:08:49 -0700
X-Received-Bytes: 3367
 by: Digital Man - Mon, 16 May 2022 06:08 UTC

To: Nightfox
Re: libarchive disallowed filenames
By: Nightfox to Digital Man on Sat May 14 2022 02:34 pm

> Hi DM,
>
> Just recently I was updating my archive viewer door to use Synchronet's
> Archive class (if possible) to view/extract archives. I'm using a try/catch
> with the Archive object, and for a few zip files, I noticed it threw an
> exception when extracting them due to disallowed filenames inside the zip
> file. For example, RIPTM154.ZIP is RIPTerm, and the following exception
> error was given when trying to extract it with Archive:
>
> RIPTM154.ZIP: Error: disallowed filename '3&HALF10.ICN' (after extracting
> 165 items successfully)
>
> Also, TM421-4.zip is the 4th zip file for Telemate, and Archivew threw an
> exception with this error:
>
> TM421-4.ZIP: Error: disallowed filename 'AT&T.SCR' (after extracting 20
> items successfully)
>
> I don't seem to have these filenames in any of my configuration files. I
> checked my text/file.can, but the only filename I have in there is
> Photo.scr. It seems like Synchronet has a built-in list of disallowed
> filenames for files inside archives?

Yes,
#define SAFEST_FILENAME_CHARS "-._0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

These are the allowed filename characters unless you're extracting with path information, in which case, you trust this archive and any filename chars are allowed.

> I'm guessing those filenames are disallowed because of the & in their names?

Correct.

> I imagine they were disallowed because & can be problematic in filenames for
> some filesystems?

Problematic for *nix shell command-lines where '&' means to execute in the background. There can be work-arounds (e.g. escaping with a backslash) and it's not an issue unless you're passing the filename on a command-line in the first place.

I can make the allowed filename characters an option to Archive.extract() and likely I was already planning to do that, but didn't get to it yet.
--
digital man (rob)

Breaking Bad quote #18:
Already, Operation: TBD, thanks for nothing Gomey. - Hank Schrader
Norco, CA WX: 63.7°F, 61.0% humidity, 0 mph E wind, 0.00 inches rain/24hrs
--- Synchronet 3.19c-Win32 NewsLink 1.113
* Vertrauen - Riverside County, California - telnet://vert.synchro.net

libarchive disallowed filenames

<6283C4CD.81293.dove_sync@digitaldistortionbbs.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=16237&group=alt.bbs.synchronet#16237

  copy link   Newsgroups: alt.bbs.synchronet
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx12.iad.POSTED!not-for-mail
From: night...@DIGDIST.remove-r3g-this (Nightfox)
Subject: libarchive disallowed filenames
Message-ID: <6283C4CD.81293.dove_sync@digitaldistortionbbs.com>
X-Comment-To: Digital Man
Organization: Digital Distortion
Newsgroups: alt.bbs.synchronet
In-Reply-To: <6281EA71.47151.sync@vert.synchro.net>
References: <6281EA71.47151.sync@vert.synchro.net>
X-FTN-PID: Synchronet 3.19c-Win32 master/254176a6b May 13 2022 MSC 1929
X-FTN-MSGID: 47159.sync@1:103/705 26e9b89a
X-FTN-REPLY: 47151.sync@1:103/705 26e7d8a0
X-FTN-CHRS: CP437 2
WhenImported: 20220517085245-0700 c1e0
WhenExported: 20220517091132-0700 c1e0
ExportedFrom: DIGDIST dove_sync 81293
Content-Type: text/plain; charset=IBM437
Content-Transfer-Encoding: 8bit
X-Gateway: vert.synchro.net [Synchronet 3.19c-Win32 NewsLink 1.113]
Lines: 29
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Tue, 17 May 2022 16:28:40 UTC
Date: Tue, 17 May 2022 08:52:45 -0700
X-Received-Bytes: 2029
 by: Nightfox - Tue, 17 May 2022 15:52 UTC

To: Digital Man
Re: libarchive disallowed filenames
By: Digital Man to Nightfox on Sun May 15 2022 11:08 pm

>> TM421-4.ZIP: Error: disallowed filename 'AT&T.SCR' (after extracting
>> 20 items successfully)

DM> Yes,
DM> #define SAFEST_FILENAME_CHARS
DM> "-._0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

DM> These are the allowed filename characters unless you're extracting with
DM> path information, in which case, you trust this archive and any filename
DM> chars are allowed.

DM> Problematic for *nix shell command-lines where '&' means to execute in the
DM> background. There can be work-arounds (e.g. escaping with a backslash) and
DM> it's not an issue unless you're passing the filename on a command-line in
DM> the first place.

Makes sense. Thanks.

Nightfox

---
■ Synchronet ■ Digital Distortion: digitaldistortionbbs.com
--- Synchronet 3.19c-Win32 NewsLink 1.113
* Vertrauen - Riverside County, California - telnet://vert.synchro.net

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor