Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jul 2011 17:36:51 -0500
From:      Stephen Montgomery-Smith <stephen@missouri.edu>
To:        Jung-uk Kim <jkim@FreeBSD.org>
Cc:        Matthias Andree <matthias.andree@gmx.de>, "freebsd-ports@FreeBSD.org" <freebsd-ports@FreeBSD.org>
Subject:   Re: [RFC] A trivial change for DESKTOP_ENTRIES
Message-ID:  <4E1E1E03.8090200@missouri.edu>
In-Reply-To: <201107131806.49966.jkim@FreeBSD.org>
References:  <201107121826.00020.jkim@FreeBSD.org> <201107131536.01059.jkim@FreeBSD.org> <4E1E09C0.9040609@missouri.edu> <201107131806.49966.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/13/2011 05:06 PM, Jung-uk Kim wrote:
> On Wednesday 13 July 2011 05:10 pm, Stephen Montgomery-Smith wrote:
>> On 07/13/2011 02:35 PM, Jung-uk Kim wrote:
>>> On Wednesday 13 July 2011 06:42 am, Matthias Andree wrote:
>>>> Am 13.07.2011 00:25, schrieb Jung-uk Kim:
>>>>> After I updated x11-wm/compiz, GNOME was not able to start the
>>>>> window manager.  Basically, it complained that compiz-manager
>>>>> was not found. Then, I realized compiz-manager.desktop was
>>>>> automagically replaced by compizmanager.desktop.  Now I tracked
>>>>> it down to this commit:
>>>>>
>>>>> Sat Nov 27 17:42:46 2010 UTC (7 months, 2 weeks ago) by pav
>>>>>
>>>>> - DESKTOP_ENTRIES: commandline is used to name installed
>>>>> .desktop file, this can lead to files containing whitespace and
>>>>> funny characters; thus strip all non-alphanumeric characters
>>>>>
>>>>> http://www.freebsd.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk.diff
>>>>> ?r 1=1.656;r2=1.657
>>>>>
>>>>> To me, it looks far too restrictive.  At least, I'd like to
>>>>> allow '-' and '_'.  Please see the attached patch.
>>>>>
>>>>> Any objections?
>>>>
>>>> The dot should also be allowed, to cover the POSIX portable
>>>> filename character set altogether.
>>>
>>> I liked the idea first.  Then, I realized that we have to add
>>> more sanity checks, e.g., ".", "..", ".foo", etc.
>>>
>>> Sorry,
>>>
>>> Jung-uk Kim
>>
>> The extra sanity check seems to add very little overhead:
>>
>> if (echo "$$4" | grep "^\..*">  /dev/null) \
>>
>> 	|| (echo "$$4" | grep [^[:alnum:]_.-]>   /dev/null); then \
>>
>>                   echo "blah blah"; \
>> fi
>>
>> And "." are very common in filenames.
>
> Some times '.' and '..' are very hard to deal with. :-(

The only other way I can think of in which "."'s can appear in a 
filename in a bad way is via "xxx/../../../../../backdoor".  But you are 
eliminating the "/"'s.

> After I applied sanity checks  ....

...but I respect your opinion because you did all this work checking it.

Are you going to check with gnomes@ as Pav suggested?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E1E1E03.8090200>