You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ka...@apache.org on 2010/08/26 15:06:28 UTC

svn commit: r989658 - /subversion/trunk/subversion/mod_dav_svn/version.c

Author: kameshj
Date: Thu Aug 26 13:06:28 2010
New Revision: 989658

URL: http://svn.apache.org/viewvc?rev=989658&view=rev
Log:
[issue3695] Fix issue 3695.

"SVNPathAuthz short_circuit ignores the authz path rules with repo prefix."

* subversion/mod_dav_svn/version.c
  (): include "mod_dav_svn.h" as we need 'dav_svn_split_uri'.
  (deliver_report): 'resource->info->repos->repo_name' is NULL when 
   SVNPathAuthz is short circuited. So populate it for the 'reponame'
   based authz rules to work.

Modified:
    subversion/trunk/subversion/mod_dav_svn/version.c

Modified: subversion/trunk/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/mod_dav_svn/version.c?rev=989658&r1=989657&r2=989658&view=diff
==============================================================================
--- subversion/trunk/subversion/mod_dav_svn/version.c (original)
+++ subversion/trunk/subversion/mod_dav_svn/version.c Thu Aug 26 13:06:28 2010
@@ -41,6 +41,7 @@
 #include "private/svn_log.h"
 
 #include "dav_svn.h"
+#include "mod_dav_svn.h"
 
 
 svn_error_t *
@@ -1014,6 +1015,22 @@ deliver_report(request_rec *r,
 
   if (doc->root->ns == ns)
     {
+      const char *cleaned_uri, *relative_path, *repos_path;
+      int trailing_slash;
+      /* During SVNPathAuthz short_circuit
+       * resource->info->repos->repo_name becomes NULL.*/
+      if (resource->info->repos->repo_name == NULL)
+        {
+          dav_error *err;
+          err = dav_svn_split_uri(r, r->uri, dav_svn__get_root_dir(r),
+                                  &cleaned_uri, &trailing_slash,
+                                  &(resource->info->repos->repo_name), 
+                                  &relative_path, &repos_path);
+          if (err)
+            {
+              return err;
+            }
+        }
       /* ### note that these report names should have symbols... */
 
       if (strcmp(doc->root->name, "update-report") == 0)