close
Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Opened 4 years ago

Closed 5 months ago

Last modified 4 months ago

#20 closed enhancement (fixed)

Add section "file name pit falls" in YAM.guide

Reported by: tboeckel Owned by: tboeckel
Priority: low Milestone: YAM 2.9
Component: documentation Version:
Severity: minor Keywords:
Cc: OS Platform:
Blocked By: Blocking:
Release Notes:

improved online documentation (http://doc.yam.ch/) regarding the use of quotes when specifying file/directory paths.

Description (last modified by damato)

YAM.guide should contain a section explaining common pit falls concerning file names, especially when these file names are passed to YAM's ARexx handling function.

This section should cover handling of file names containing spaces and other special characters which might cause problems with dos/ReadArgs() (see bug #635893) and hence either need to be escaped or surrounded by quotes.


Moved from SF:
https://sourceforge.net/tracker/?func=detail&aid=1609020&group_id=13560&atid=464455

Attachments (3)

escwc (1013 bytes) - added by AmigaPhil 7 months ago.
ARexx function to escape wildcard characters in filenames
reference (1.3 KB) - added by AmigaPhil 7 months ago.
Guide node: Reference - Message storage
wikidoc.lha (151.6 KB) - added by AmigaPhil 7 months ago.
Amiga guide to Wiki docs

Download all attachments as: .zip

Change History (16)

comment:1 Changed 4 years ago by damato

  • Priority changed from major to undecided
  • Severity set to major

comment:2 Changed 4 years ago by damato

  • Component changed from stable build to documentation

comment:3 Changed 4 years ago by damato

  • Cc yamos-svn@… removed

comment:4 Changed 15 months ago by damato

  • Description modified (diff)
  • Milestone set to YAM 2.9
  • Priority changed from undecided to low
  • Severity changed from major to minor
  • Status changed from new to accepted

accepting ticket for 2.9 release. Please note that such a documentation enhancement should be performed now in the HTML-based documentation instead.

comment:5 Changed 10 months ago by damato

  • Owner changed from somebody to tboeckel
  • Status changed from accepted to assigned

comment:6 Changed 7 months ago by AmigaPhil

Is this ticket still valid ?

I mean, after reading it, I quickly check my own Incoming folder, and saw no unsafe filenames.

Quoted from the Yam 2.8p1 guide:

Each message is saved as a separate file of which the filename 
is constructed by encoding certain information about the mail 
(date, status, etc) using the Base64 standard encoding.
The resulting name is compatible to any filesystem.

Indeed, characters resulting of a Base64 encoding are safe for filenames. There is also no risk that spaces can be embedded in it.
For the extra part of the filename construction, the equal sign, plus, minus, dot, comma, are also valid characters for filenames.
So, as far as with the current stable version of Yam (2.8p1), there is no risk that Yam can make the DOS to go mad.

If the reporter of this ticket is looking for a way to deal with possibly unsafe filenames from ARexx scripting, here is attached an ARexx function that I'm using for escaping wildcard characters.
Usage: SafeFilename = escwc(UnSafeFilename)

As for possible spaces in filenames, the internal space() function should help to remove or replace them by, eg, a "+" or a "_".

Maybe I misunderstood the ticket ?
Is there a need of documenting how to parse the messages' filenames ?
Are there cases where Yam can produce no so secured filenames ?

Changed 7 months ago by AmigaPhil

ARexx function to escape wildcard characters in filenames

comment:7 Changed 7 months ago by AmigaPhil

Is there a need of documenting how to parse the messages' filenames ?

This made myself curious, so I've updated a node in the English guide with some info I guessed.

(Do not append it on the guide before proof-reading/completing the info.)

Changed 7 months ago by AmigaPhil

Guide node: Reference - Message storage

comment:8 Changed 7 months ago by damato

Sorry, but we abadoned the Amigaguide documentation with YAM 2.8 in favour of documenting everything here in the wiki of the yam homepage. So we won't release any further amigaguide documentation but will try to improve the online docs.

comment:9 follow-up: Changed 7 months ago by AmigaPhil

Would you like help with the online documentation ?
I can convert the guide nodes into wiki formatted documents.

comment:10 in reply to: ↑ 9 ; follow-up: Changed 7 months ago by tboeckel

Replying to AmigaPhil:

Would you like help with the online documentation ?
I can convert the guide nodes into wiki formatted documents.

Help is definitely always welcome. I am absolutely no wiki expert and unfortunately Jens is currently on vacation for the next 3 weeks. But if you can prepare something in the meantime then feel free to go ahead.

comment:11 in reply to: ↑ 10 Changed 7 months ago by AmigaPhil

Replying to thboeckel:

Help is definitely always welcome. I am absolutely no wiki expert and unfortunately Jens is currently on vacation for the next 3 weeks. But if you can prepare something in the meantime then feel free to go ahead.

The ARexx API? documentation is now online (see also #434).
I've tried to include changes since the latest update of the guide, so please review REQUESTFILE?, WRITEIDENTITY?, FINDMAIL?, and SETMAIL?. There are probably other changes to be made that I am not aware of...

For the other parts of the documentation, there are many things I can't decide by myself; so I prefer to let you, or Jens, to update them. If it can help, I'm attaching here the guide nodes converted to wiki files.
Please note that you cannot just copy and paste them. The titles are to be re-build (prepending the lines with 2 or more equal signs), ensure that all lines of a paragraph are idented the same way to keep it consistent, add line feed (double backslash) where needed, and escape some characters to avoid wiki interpretation.

Changed 7 months ago by AmigaPhil

Amiga guide to Wiki docs

comment:12 Changed 5 months ago by tboeckel

  • Resolution set to fixed
  • Status changed from assigned to closed

I just added a section to the global ARexx documentation to add quotes to any kind of file name and to check scripts with a file located in the Amiga RAM disk, i.e. "RAM Disk:foo/bar".

comment:13 Changed 4 months ago by damato

  • Release Notes modified (diff)

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber

  • Thore Böckelmann(Reporter, Owner, Participant)