[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Disallow going below root in svnserve

From: Nuutti Kotivuori <naked_at_iki.fi>
Date: 2002-12-09 18:49:25 CET

Greg Hudson wrote:
> On Mon, 2002-12-09 at 12:16, Nuutti Kotivuori wrote:
>> + apr_err = apr_filepath_merge(&buffer,
>> + svn_path_canonicalize(root, pool),
>> + svn_path_canonicalize(client_path, pool),
>> + APR_FILEPATH_SECUREROOT,
>> + pool);
>
> I looked at the win32 apr_filepath code and it looks like it can deal
> with '/' separators, but I don't know how guaranteed that is.

I'm also wondering if the APR_FILEPATH_NATIVE would be a good thing
there. Then I started wondering about the UTF-8 translation -
apr_path_get_absolute seems to be doing a lot of that and it's the
only place where we use apr_filepath_merge (yet).

It's a bit of a mess in my head which paths should be in which
format on a certain platform, and which paths should be in UTF-8
format with regarding ra_svn and which shouldn't.

Actually, it's a bit of a mess in my head altogether, I haven't
slept too recently.

>> + if(apr_err)
>> + return svn_error_create(SVN_ERR_BAD_FILENAME, apr_err, NULL,
>> + "Couldn't determine repository path.");

[...]

> In the meantime, I think this error should either be
> "(SVN_ERR_BAD_FILENAME, 0" or "(apr_err, 0".

The former sounds like a good choice, I'll change my code to do
that for now.

-- Naked

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Dec 9 18:50:10 2002

This is an archived mail posted to the Subversion Dev mailing list.