On 10/24/2009 03:29 PM, s...@apache.org 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? So somehere/some(parens)path is now forbidden. Why? I would say that only the following patterns should be invalid: somehere/some(NONUMBERS somehere/some(NONUMBERS) somehere/some(NUMBERS everything else should be allowed and if we do end the string with (NUMBERS) it should be assumed that no cache size was given Regards RĂ¼diger