You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Shane Beasley <sh...@aleri.com> on 2009/06/19 23:07:33 UTC

bug: mirror WebDAV munging checkins containing "/SVN"

We're using the CollabNet 1.6.1 suite Apache/WebDAV on two servers in a 
master/mirror setup. Recently, one of us tried to commit to the mirror a 
file that contained the string "/SVN". The master replied with an "svn: 
Checksum mismatch, file..." error -- apparently the file was mangled en 
route.

Using Wireshark, we found that the mirror was rewriting the string 
"/SVN" to the string "/svn" inside the file being committed (!!!), 
thereby perturbing the checksum.

Initial research points to dav_svn__location_body_filter:

    
http://svn.collab.net/viewvc/svn/trunk/subversion/mod_dav_svn/mirror.c?revision=36159

It seems to be doing a case-insensitive search-and-replace from 
"remotepath" -- the path component of the master server URI ("/svn" in 
our case) -- to "localpath" -- apparently the root of the repository as 
the mirror knows it (also "/svn" in our case). I suspect that it's doing 
this search-and-replace against the file we're committing, in which case 
presumably it shouldn't be doing that -- although I'm not sure what it's 
supposed to be doing instead.

I suspect that our particular case can be fixed by removing the 
case-sensitivity check, but that's obviously a hack. :) Any better ideas?

Thanks!

Shane

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2363710

Re: bug: mirror WebDAV munging checkins containing "/SVN"

Posted by David Glasser <gl...@davidglasser.net>.
This does look pretty nasty.  Like, "don't use this feature, it will
corrupt your data" nasty.

That filter is under-documented; I'm not sure what it's trying to
convert.  I suppose URLs in the metadata of requests.  Justin, this is
your code, right?

--dave

On Fri, Jun 19, 2009 at 4:07 PM, Shane Beasley<sh...@aleri.com> wrote:
> We're using the CollabNet 1.6.1 suite Apache/WebDAV on two servers in a
> master/mirror setup. Recently, one of us tried to commit to the mirror a
> file that contained the string "/SVN". The master replied with an "svn:
> Checksum mismatch, file..." error -- apparently the file was mangled en
> route.
>
> Using Wireshark, we found that the mirror was rewriting the string
> "/SVN" to the string "/svn" inside the file being committed (!!!),
> thereby perturbing the checksum.
>
> Initial research points to dav_svn__location_body_filter:
>
>
> http://svn.collab.net/viewvc/svn/trunk/subversion/mod_dav_svn/mirror.c?revision=36159
>
> It seems to be doing a case-insensitive search-and-replace from
> "remotepath" -- the path component of the master server URI ("/svn" in
> our case) -- to "localpath" -- apparently the root of the repository as
> the mirror knows it (also "/svn" in our case). I suspect that it's doing
> this search-and-replace against the file we're committing, in which case
> presumably it shouldn't be doing that -- although I'm not sure what it's
> supposed to be doing instead.
>
> I suspect that our particular case can be fixed by removing the
> case-sensitivity check, but that's obviously a hack. :) Any better ideas?
>
> Thanks!
>
> Shane
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2363710
>



-- 
glasser@davidglasser.net | langtonlabs.org | flickr.com/photos/glasser/

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2365481