Subj : Problem with filenames containing spaces
To   : All
From : Paul Hayton
Date : Thu Jan 13 2022 11:53 am

Hi there.

A file was uploaded to Agency BBS by a user and was called

MyGUI v1.0.2.26.zip

There was a space between MyGUI and the V1. but I didn't think anything
of it. I know better now :)

I'd moved this file using sysop file editor tools in my Mystic BBS and hatched it from Agency BBS to the wider fsxNet.

Mystic BBS logs show:

-----------------  MUTIL v1.12 A47 2021/11/06 Sun, Jan 09 2022 (loglevel 3)
+ Jan 09 17:09:35  Startup using mailin.ini
- Jan 09 17:09:35  EXEC FileToss
- Jan 09 17:09:35  EXEC ImportEchoMail
+ Jan 09 17:09:35  Process: Toss FDN/TIC Files
+ Jan 09 17:09:35    Waiting for BUSY nodes
+ Jan 09 17:09:35    Scanning Hatches
+ Jan 09 17:09:35    Hatching: MyGUI v1.0.2.26.zip from Mystic BBS Utils, Mods Etc.
+ Jan 09 17:09:35    Tossing to 21:1/100
+ Jan 09 17:09:35  Results: 0 import, 1 toss, 1 hatch, 0 bad in 0.02s


The TIC file from Mystic contains

Created By Mystic BBS v1.12 A47
Area FSX_MUTL
AreaDesc Mystic BBS Utils, Mods Etc.
File MyGUI v1.0.2.26.zip
Size 1669424
CRC d39eeb54
Replaces MyGUI v1.0.2.26.zip


Htick at 21:1/100 HUB then tosses the file to other nodes...

----------------------- Sun 09 Jan 2022, htick/lnx 1.9.0-cur 2021-03-11
1 Jan:09:2022:17:11:00  Start
7 Jan:09:2022:17:11:00  Checking tmp dir
C Jan:09:2022:17:11:00  Start tossing...
7 Jan:09:2022:17:11:00  Processing Tic-File /hub/echomail/in/MyGUI v1.0.2.26.tic
7 Jan:09:2022:17:11:00  File "MyGUI v1.0.2.26.zip": size: 1669424, area: FSX_MUTL, from: 21:1/101, orig: 21:1/101
M Jan:09:2022:17:11:00  Moved /hub/echomail/in/MyGUI v1.0.2.26.zip to /ftn/files/fsx/fsx_mutl/MyGUI v1.0.2.26.zip
M Jan:09:2022:17:11:00  Report file /ftn/files/announce/1cemsgdy.tic created for file MyGUI v1.0.2.26.zip
S Jan:09:2022:17:11:00  Linked: /ftn/files/fsx/fsx_mutl/MyGUI v1.0.2.26.zip
S Jan:09:2022:17:11:00      to: /hub/filebox/fsxnet_z21n2n100/MyGUI v1.0.2.26.zip


Using BinkD as the mailer at 21:1/100 I then noticed some BBS nodes polling in were having this issue:

+ 09 Jan 19:19:38 [24867] call to 21:1/107@fsxnet
 09 Jan 19:19:38 [24867] trying bbs.thebytexchange.com [204.12.198.27]...
 09 Jan 19:19:39 [24867] connected
+ 09 Jan 19:19:39 [24867] outgoing session with bbs.thebytexchange.com:24554 [204.12.198.27]
- 09 Jan 19:19:39 [24867] OPT CRAM-MD5-39f913bebc0dbe388a3671b63e62f6f8
+ 09 Jan 19:19:39 [24867] Remote requests MD mode
- 09 Jan 19:19:39 [24867] SYS The ByteXchange BBS
- 09 Jan 19:19:39 [24867] ZYZ Nugax
- 09 Jan 19:19:39 [24867] TIME Sun, 09 Jan 2022 00:19:39 -0600
- 09 Jan 19:19:39 [24867] VER Mystic/1.12A47 binkp/1.0
- 09 Jan 19:19:39 [24867] BUILD 2020/10/13 12:55:27 Linux/64
+ 09 Jan 19:19:39 [24867] addr: 1:19/37@fidonet
+ 09 Jan 19:19:39 [24867] addr: 40:100/2@cybernet (n/a or busy)
+ 09 Jan 19:19:39 [24867] addr: 21:1/107@fsxnet
+ 09 Jan 19:19:39 [24867] addr: 10:102/1@araknet (n/a or busy)
+ 09 Jan 19:19:39 [24867] addr: 618:200/32@micronet (n/a or busy)
+ 09 Jan 19:19:39 [24867] addr: 42:256/6@sfnet (n/a or busy)
+ 09 Jan 19:19:39 [24867] addr: 700:100/12@spooknet (n/a or busy)
+ 09 Jan 19:19:39 [24867] addr: 42:972/1@dorenet (n/a or busy)
+ 09 Jan 19:19:39 [24867] addr: 11:1/200@wwivftn (n/a or busy)
+ 09 Jan 19:19:40 [24867] pwd protected session (MD5)
+ 09 Jan 19:19:40 [24867] sending /hub/filebox/fsxnet_z21n1n107/MyGUI v1.0.2.26.zip as MyGUI\x20v1.0.2.26.zip (1669424)
- 09 Jan 19:19:40 [24867] QSIZE 0 files 0 bytes
? 09 Jan 19:19:40 [24867] M_GOT: cannot parse args
+ 09 Jan 19:19:40 [24867] done (to 21:1/107@fsxnet, failed, S/R: 0/0 (0/0 bytes))

incoming nodes (earlier Mystic version) seem to have the same problem.

+ 09 Jan 23:58:08 [6668] incoming session with 47-220-170-115.gtwncmkt04.res.dyn.suddenlink.net [47.220.170.115]
- 09 Jan 23:58:08 [6668] SYS Cold War Computing BBS
- 09 Jan 23:58:08 [6668] ZYZ Jeff
- 09 Jan 23:58:08 [6668] TIME Sun, 09 Jan 2022 04:58:08 -0600
- 09 Jan 23:58:08 [6668] VER Mystic/1.12A46 binkp/1.0
- 09 Jan 23:58:08 [6668] BUILD 2020/08/26 19:01:33 Raspberry Pi/32
+ 09 Jan 23:58:08 [6668] addr: 21:1/180@fsxnet
+ 09 Jan 23:58:08 [6668] pwd protected session (MD5)
+ 09 Jan 23:58:08 [6668] sending /hub/filebox/fsxnet_z21n1n180/MyGUI v1.0.2.26.zip as MyGUI\x20v1.0.2.26.zip (1669424)
- 09 Jan 23:58:08 [6668] QSIZE 0 files 0 bytes
? 09 Jan 23:58:09 [6668] M_GOT: cannot parse args
+ 09 Jan 23:58:09 [6668] done (from 21:1/180@fsxnet, failed, S/R: 0/0 (0/0 bytes))

My fix was to delete the file out of file boxes to get traffic flowing again.

I spoke with the Mystic author and his reply was

[snip]

This seems to be related to a long standing issue with BinkD escaping filenames incorrectly.  You'll have to get it fixed in BinkD.

A47 has a workaround for the BinkD bugs but A46 would not.

PH> v1.0.2.26.zip as MyGUI\x20v1.0.2.26.zip (1669424)

This is not a properly escaped filename being sent by BinkD as it does not
follow the BINKP protocol specifications for filename escaping:

5.2 File Name Issues
--------------------
In Mailer-parseable commands that contain a file name, the file name MUST NOT
include a whitespace (ASCII value 20 hex). The file name SHOULD NOT include
symbols other than alphanumeric (A-Z,a-z,0-9) and safe characters as defined
below in BNF. All other symbols are to be considered unsafe and SHOULD be
escaped in the form of two hexadecimal digits preceded by a backslash (e.g. a
whitespace must be transmitted as "\20").

 filename        = *pchar
 pchar           = unreserved | escape
 unreserved      = ALPHA | DIGIT | safe
 safe            = "@" | "&" | "=" | "+" | "%" | "$" | "-" | "_" |
                   "." | "!" | "(" | ")" | "#" | "|"
 escape          = "\" HEX HEX

[snip]

Is it possible please for BinkD to be updated so that if a file name with a space in it is sent using BinkD to a remote system the filename escaping is transmitted as per suggestions above?

With thanks, Paul.

--- Mystic BBS v1.12 A47 2021/11/06 (Linux/64)
* Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (3:770/100)