pcre/regexp in mod_authz_svn
From: Josh Siegel <joshs_at_stormbirds.org>
Date: 2005-02-18 17:29:07 CET
After extensive conversations in irc yesterday as well as via private
First, section header parsing (libsvn_subr/config_file.c:parse_section_name)
[repos:/foo/[^/]+/]
Right now if ] is anywhere but at the end, it emits a "Section header
Second, the hard issue is with pcre itself. M_COPY, M_MOVE, and
mod_authz_svn calls parse_authz_sections to search for sections where
Problem is you run into problems with things like
[repos:/a/b/.*/d]
/a/b/c is a partial match against this section header which would mean
Solutions:
1) glob out the expression into all matching pathnames and then do
Expensive and expensive and slow...
2) pcre 5.0 supports partial matches. Since /a/b/c would be a
Apache 2.0.53 does not have pcre 5.0.. you need apache 2.2 or you
3) ignore regular expressions when doing the recursive checks
Would you like me to help tighten that rope around your neck?
thoughts?
As a FYI, my test currently has option #3 in place and I have been doing
[repos:/groups/([^/]+)/]
[repos:/private/([^/]+)]
ie, you create a group folder under /groups and it automatically looks
- josh siegel
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.