Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 94DBD9F9E47 for ; Mon, 3 Sep 2007 04:56:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 28264-03 for ; Mon, 3 Sep 2007 04:56:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from svr2.hagander.net (svr2.hagander.net [88.198.128.226]) by postgresql.org (Postfix) with ESMTP id 0716B9F9E64 for ; Mon, 3 Sep 2007 04:56:12 -0300 (ADT) Received: by svr2.hagander.net (Postfix, from userid 1000) id 03B5ADCC6C4; Mon, 3 Sep 2007 09:56:09 +0200 (CEST) Date: Mon, 3 Sep 2007 09:56:09 +0200 From: Magnus Hagander To: Gregory Stark Cc: Tom Lane , Oleg Bartunov , Pavel Stehule , PostgreSQL Hackers Subject: Re: tsearch filenames unlikes special symbols and numbers Message-ID: <20070903075609.GD21833@svr2.hagander.net> References: <162867790709021328i7771aa9jfe79268bccbf123d@mail.gmail.com> <18259.1188773171@sss.pgh.pa.us> <87y7foir7t.fsf@oxford.xeocode.com> <19257.1188777110@sss.pgh.pa.us> <87tzqci6tp.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87tzqci6tp.fsf@oxford.xeocode.com> User-Agent: Mutt/1.5.11 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/72 X-Sequence-Number: 107224 On Mon, Sep 03, 2007 at 07:47:14AM +0100, Gregory Stark wrote: > "Tom Lane" writes: > > > Gregory Stark writes: > >> "Tom Lane" 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