Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CA7059F9596 for ; Mon, 3 Sep 2007 03:47:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 27943-01 for ; Mon, 3 Sep 2007 03:47:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from oxford.xeocode.com (unknown [87.127.95.196]) by postgresql.org (Postfix) with ESMTP id 35B4E9F9725 for ; Mon, 3 Sep 2007 03:47:19 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.67) (envelope-from ) id 1IS5iN-0003YH-8H; Mon, 03 Sep 2007 07:47:15 +0100 To: "Tom Lane" Cc: "Oleg Bartunov" , "Pavel Stehule" , "PostgreSQL Hackers" Subject: Re: tsearch filenames unlikes special symbols and numbers In-Reply-To: <19257.1188777110@sss.pgh.pa.us> (Tom Lane's message of "Sun\, 02 Sep 2007 19\:51\:50 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX" 35367) References: <162867790709021328i7771aa9jfe79268bccbf123d@mail.gmail.com> <18259.1188773171@sss.pgh.pa.us> <87y7foir7t.fsf@oxford.xeocode.com> <19257.1188777110@sss.pgh.pa.us> From: Gregory Stark Organization: EnterpriseDB Date: Mon, 03 Sep 2007 07:47:14 +0100 Message-ID: <87tzqci6tp.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/67 X-Sequence-Number: 107219 "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). > There's a reasonable argument for restricting the names used for these > things in the SQL definitions to be valid SQL identifiers, so that that > will work nicely... Ah -- Gregory Stark EnterpriseDB http://www.enterprisedb.com