Clark Rawlins <clark@bit63.org> writes:
> This small patch fixes a problem where etags sometimes can contain
> unescaped & characters.
>
> To reproduce:
> svnadmin create test
> {configure apache to use test as a repos}
> svn co http://localhost/svn/test
> cd test
> touch test\&test
> svn add test\&test
> svn commit -m "Add file with an ampersand in the name."
> cd ..
> rm -rf test
> svn co http://localhost/svn/test
> XML parse error here!
>
> This five line patch fixes the problem.
I tried something similar, and while the above works, the following
fails
svn mv http://localhost/svn/test/test\&test \
http://localhost/svn/test/test\&test2
svn up test
A test/test&test2
D test/test&test
> Index: repos.c
> ===================================================================
> --- repos.c
> +++ repos.c 2002-09-26 22:27:44.000000000 -0500
> @@ -1597,6 +1597,7 @@
> {
> svn_error_t *serr;
> svn_revnum_t created_rev;
> + const char *quoted_path;
>
> /* if the resource doesn't exist, isn't a simple REGULAR or VERSION
> resource, or it is a Baseline, then it has no etag. */
> @@ -1616,9 +1617,12 @@
> /* ### what to do? */
> return "";
> }
> +
> + quoted_path = apr_xml_quote_string(resource->pool,
> + resource->info->repos_path, 1);
>
> return apr_psprintf(resource->pool, "\"%" SVN_REVNUM_T_FMT "/%s\"",
> - created_rev, resource->info->repos_path);
> + created_rev, quoted_path);
> }
>
> static dav_error * dav_svn_set_headers(request_rec *r,
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 27 17:54:35 2002