[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: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2002-12-09 18:31:57 CET

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.

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

It seems wrong to put an apr err in the src_err field. We do it in a
few other places (in time.c and path.c; Nuutti says he copied this code
from path.c), but not most of the time.

I'm starting to become convinced that src_err should just go away. When
you're looking at an error structure, you don't know what namespace
src_err lives in (the comment claims it might be an "errno, h_errno,
etc."). handle_error does nothing with it.

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

---------------------------------------------------------------------
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:32:45 2002

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