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

Re: mod_dav_svn segfaults on MKACTIVITY

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2003-05-20 05:10:12 CEST

Joachim Feise <jfeise@ics.uci.edu> writes:

> Ben Collins-Sussman wrote:
> > Joachim Feise <jfeise@ics.uci.edu> writes:
> >
> >
> >>>Are you issuing a direct MKACTIVITY with some non-svn client?
> >>
> >>Yes.
> >>
> >
> >
> > Do you have a tool for doing that? I'd like to reproduce the segfault
> > locally, but cadaver only allows me to issue WebDAV requests, not
> > DeltaV ones.
>
>
> here is a backtrace.
> MKACTIVITY without any body is enough to reproduce it.

OK, an arbitrary MKACTIVITY now returns an error. I committed the
change in r5988. Thanks for finding this!

Here's the mod_dav_svn patch, if you want to apply it locally:

Index: subversion/mod_dav_svn/version.c
===================================================================
--- subversion/mod_dav_svn/version.c (revision 5987)
+++ subversion/mod_dav_svn/version.c (revision 5988)
@@ -799,8 +799,16 @@
   const char *txn_name;
   dav_error *err;
 
- /* ### need to check some preconditions? */
-
+ /* sanity check: make sure the resource is a valid activity, in
+ case an older mod_dav doesn't do the check for us. */
+ if (! dav_svn_can_be_activity(resource))
+ return dav_new_error_tag(resource->pool, HTTP_FORBIDDEN,
+ SVN_ERR_APMOD_MALFORMED_URI,
+ "Activities cannot be created at that location; "
+ "query the DAV:activity-collection-set property.",+ SVN_DAV_ERROR_NAMESPACE,
+ SVN_DAV_ERROR_TAG);
+
   err = dav_svn_create_activity(resource->info->repos, &txn_name,
                                 resource->pool);
   if (err != NULL)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 20 05:11:26 2003

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.