Re: tsearch filenames unlikes special symbols and numbers - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: tsearch filenames unlikes special symbols and numbers
Date
Msg-id 20070903075609.GD21833@svr2.hagander.net
Whole thread Raw
In response to Re: tsearch filenames unlikes special symbols and numbers  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: tsearch filenames unlikes special symbols and numbers
List pgsql-hackers
On Mon, Sep 03, 2007 at 07:47:14AM +0100, Gregory Stark wrote:
> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
> 
> > Gregory Stark <stark@enterprisedb.com> writes:
> >> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
> >>> I made it reject all but latin letters, which is the same restriction
> >>> that's in place for timezone set filenames.  That might be overly
> >>> strong, but we definitely have to forbid "." and "/" (and "\" on
> >>> Windows).  Do we want to restrict it to letters, digits, underscore?
> >>> Or does it need to be weaker than that?
> >
> >> What's the problem with "."?
> >
> > ../../../../etc/passwd
> >
> > Possibly we could allow '.' as long as we forbade /, 
> 
> Right, traditionally the only characters forbidden in filenames in Unix are /
> and nul. If we want the files to play nice in Gnome etc then we should
> restrict them to ascii since we don't know what encoding the gui expects. 
> 
> Actually I think in Windows \ : and . are problems (not allowed more than one
> dot in dos).

\ and : are problems.

. is not a problem. We don't support 16-bit windows anyway, and multiple
dots works fine on any system we support.

//Magnus


pgsql-hackers by date:

Previous
From: "Marko Kreen"
Date:
Subject: Re: Per-function search_path => per-function GUC settings
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: [PATCH] Lazy xid assingment V2