httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: svn commit: r829362 - in /httpd/httpd/trunk: CHANGES modules/cache/mod_socache_shmcb.c
Date Sat, 24 Oct 2009 19:05:31 GMT


On 10/24/2009 08:58 PM, Stefan Fritsch wrote:
> On Sat, 24 Oct 2009, Ruediger Pluem wrote:
>>> Author: sf
>>> Date: Sat Oct 24 13:29:03 2009
>>> New Revision: 829362
>>>
>>> URL: http://svn.apache.org/viewvc?rev=829362&view=rev
>>> Log:
>>> Only allow parens in filename if cachesize is given. Return error
>>> otherwise
>>> to catch missing parens.
>>>
>>> Modified:
>>>     httpd/httpd/trunk/CHANGES
>>>     httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c
>>>
>>
>>> Modified: httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c
>>> URL:
>>> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c?rev=829362&r1=829361&r2=829362&view=diff
>>>
>>> ==============================================================================
>>>
>>> --- httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c (original)
>>> +++ httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c Sat Oct 24
>>> 13:29:03 2009
>>> @@ -280,11 +280,20 @@
>>>
>>>      cp = strrchr(path, '(');
>>>      cp2 = path + strlen(path) - 1;
>>> -    if (cp && (*cp2 == ')')) {
>>> +    if (cp) {
>>> +        char *endptr;
>>> +        if (*cp2 != ')') {
>>> +            return "Invalid argument: no closing parenthesis or
>>> cache size "
>>> +                   "missing after pathname with parenthesis";
>>> +        }
>>
>> Doesn't this bring us back to the start where filenames with ( ) are
>> not allowed?
> 
> Now we consistently allow ( ) in the file name if the cache size is
> given at the end. Before my changes, we never allowed ( ) in the file
> name, even if there was an additional (NUMBERS) at the end.

Ok, now I get it better. This is also fine with me.

Regards

RĂ¼diger


Mime
View raw message