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

Re: [PATCH] mod_dav_svn: Prevent multi-author commits, prevent no-author commits when there is an author

From: Sander Striker <striker_at_apache.org>
Date: 2004-03-16 06:49:49 CET

On Tue, 2004-03-16 at 00:30, Greg Stein wrote:
> On Mon, Mar 15, 2004 at 12:12:19PM +0100, Sander Striker wrote:

[...]
> > + /* Set the txn author if not previously set. Protect against multi-author
> > + * commits by verifying authenticated user associated with the current
> > + * request is the same as the txn author.
> > + */
> > + if (comb->priv.repos->username)
>
> Note that this allows for an author to be set at some point, and then a
> later operation to *not* have a username set. I think this is acceptable.

I think I'd go as far as call it nessecary ;). Remember, some parts of
the repos may have anonymous write, while other parts may not. I'll put
this in the comment.

> The problem really comes up only when you have a change in author.

Agreed.

> >...
> > + request_author = svn_string_create(comb->priv.repos->username, pool);
>
> There isn't a reason to copy the string onto the heap. Just do:
>
> request_author.data = comb->priv.repos->username;
> request_author.len = strlen(request_author.data);
>
> And then use &request_author where necessary.

*nod*, very sensible ;).

Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 16 06:50:06 2004

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.