Author: breser
Date: Fri Jan  4 21:53:37 2013
New Revision: 1429147

URL: http://svn.apache.org/viewvc?rev=1429147&view=rev
Log:
Within the implementation of svn_repos_authz_read2() only canonicalize
repos relative URLs.

* subversion/libsvn_repos/authz.c
  (authz_retreive_config_repo): Don't canonicalize dirent here but rather ...
  (authz_retrieve_config): canonicalize repos relative URLs here.


Modified:
    subversion/trunk/subversion/libsvn_repos/authz.c

Modified: subversion/trunk/subversion/libsvn_repos/authz.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/authz.c?rev=1429147&r1=1429146&r2=1429147&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/authz.c (original)
+++ subversion/trunk/subversion/libsvn_repos/authz.c Fri Jan  4 21:53:37 2013
@@ -792,10 +792,9 @@ authz_retrieve_config_repo(svn_config_t 
   svn_revnum_t youngest_rev;
   svn_node_kind_t node_kind;
   svn_stream_t *contents;
-  const char *canon_dirent = svn_dirent_canonicalize(dirent, scratch_pool);
 
   /* Search for a repository in the full path. */
-  repos_root_dirent = svn_repos_find_root_path(canon_dirent, scratch_pool);
+  repos_root_dirent = svn_repos_find_root_path(dirent, scratch_pool);
   if (!repos_root_dirent)
     return svn_error_createf(SVN_ERR_AUTHZ_INVALID_CONFIG, NULL,
                              "Unable to find repository at '%s'", dirent);
@@ -803,7 +802,7 @@ authz_retrieve_config_repo(svn_config_t 
   /* Attempt to open a repository at repos_root_dirent. */
   SVN_ERR(svn_repos_open2(&repos, repos_root_dirent, NULL, scratch_pool));
 
-  fs_path = &canon_dirent[strlen(repos_root_dirent)];
+  fs_path = &dirent[strlen(repos_root_dirent)];
 
   /* Root path is always a directory so no reason to go any further */
   if (*fs_path == '\0')
@@ -885,6 +884,7 @@ authz_retrieve_config(svn_config_t **cfg
 
       err = svn_path_resolve_repos_relative_url(&dirent, path,
                                                 repos_root, scratch_pool);
+      dirent = svn_dirent_canonicalize(dirent, scratch_pool);
 
       if (err == SVN_NO_ERROR) 
         err = authz_retrieve_config_repo(cfg_p, dirent, must_exist, pool,


Reply via email to