A Case for Limits on File Names

Geek

Active member
Joined
Jun 6, 2008
Messages
22,825
Reaction score
0
Points
36
Ray Ingles pointed out this position paper which I think is worth looking at ...

Traditionally, Unix/Linux/POSIX pathnames and filenames can be almost any sequence of bytes. A pathname lets you select a particular file, and may include one or more "/" characters. Each pathname component (separated by "/") is a filename; filenames cannot contain "/". Neither filenames nor pathnames can contain the ASCII NUL character (\0), because that is the terminator.This lack of limitations is flexible, but it also creates a legion of unnecessary problems. In particular, this lack of limitations makes it unnecessarily difficult to write correct programs (enabling many security flaws). It also makes it impossible to consistently and accurately display filenames, causes portability problems, and confuses users.

This article will try to convince you that adding some tiny limitations on legal Unix/Linux/POSIX filenames would be an improvement. Many programs already presume these limitations, the POSIX standard already permits such limitations, and many Unix/Linux filesystems already embed such limitations -- so it'd be better to make these (reasonable) assumptions true in the first place.​

Read the rest of this post... | Read the comments on this post...
OeUlgChoLTs


More...
 
Back
Top