You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Garrick Olson <Ga...@Aceva.com> on 2004/03/01 08:25:24 UTC

RE: Re: Corrupt log message in repository

This still seems like an svn bug to me.  Shouldn't the *server* enforce
any of these kinds of conventions a client must follow?

As a repository owner, it is difficult for me to control what clients
are being used, and I would expect the server to prevent repository
corruption even by potentially adversarial clients.

--- Ben Reser wrote:
Okay that's what I was thinking this might be.  This is a TortoiseSVN
bug.  Per our documentation the log message must be UTF-8 with LF line
endings:

http://svn.collab.net/svn-doxygen/svn__client_8h.html#a10

TortoiseSVN should either convert to the proper format or error out.
They can handle that by using svn_subst_translate_string() like the
command line client does in svn_cl__get_log_message():
http://svn.collab.net/repos/svn/trunk/subversion/clients/cmdline/util.c


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: Corrupt log message in repository

Posted by Greg Hudson <gh...@MIT.EDU>.
On Mon, 2004-03-01 at 15:46, Ben Reser wrote:
> I'm not sure.  I can see both arguments.  On one hand our documentation
> says you're supposed to do this conversion already so us erroring out
> wouldn't be necessarily unexpected, provided we can do so with an
> existing error message that makes sense.
> 
> But on the other hand it's not behavior that we're exhibiting now.

This is a specific instance of the general case of "tightening" an API:
enforcing a restriction which was previously documented but unenforced.

I'd say that tightening an API is not great fodder for a third-number
release (1.0.1) because we want those releases to be absolutely safe to
apply.  I think it's a judgement call whether tightening is good fodder
for a second-number release (1.1.0); it depends on how much we expect
things to break in ways people care about.  I'd say this instance
belongs in 1.1, but could be swayed if I learned about a bunch of people
relying on the lax behavior of the current code.  (If I understand the
problem right, they would have to be people using file:// or svn://
rather than http://, and they would have to be using non-UTF8 log
messages with a UTF8 locale.)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Corrupt log message in repository

Posted by Ben Reser <be...@reser.org>.
On Mon, Mar 01, 2004 at 12:25:24AM -0800, Garrick Olson wrote:
> This still seems like an svn bug to me.  Shouldn't the *server* enforce
> any of these kinds of conventions a client must follow?
> 
> As a repository owner, it is difficult for me to control what clients
> are being used, and I would expect the server to prevent repository
> corruption even by potentially adversarial clients.

It'd be nice if that was the case but that doesn't help us now.  We've
got a released product.  

However, in the future I don't see any reason this couldn't be dealt
with.  The question is, would erroring out on this be a change in an
implementation detail or an actual change of our API that we'd have to
make a new function call for or wait for 2.0 to make.

I'm not sure.  I can see both arguments.  On one hand our documentation
says you're supposed to do this conversion already so us erroring out
wouldn't be necessarily unexpected, provided we can do so with an
existing error message that makes sense.

But on the other hand it's not behavior that we're exhibiting now.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Corrupt log message in repository

Posted by Tobias Ringstrom <to...@ringstrom.mine.nu>.
terry@eatoni.com wrote:
> | In the case of log messages (and other text properties), the server
> | can easily check if the byte sequence is valid UTF-8.
> 
> I wrote some code to do this that I can probably donate / integrate if
> a decision is made to actually do this checking. It does a reasonable
> job, checking for illegal surrogates and as well as codepoints encoded
> with more bytes than necessary, along with basic UTF-8 checking. It's
> all very simple, so it runs fast.

Thanks, but we already have UTF-8 verification code.  It's just a 
question of using it and adding a line feed check.

/Tobias


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Re: Corrupt log message in repository

Posted by te...@eatoni.com.
| In the case of log messages (and other text properties), the server
| can easily check if the byte sequence is valid UTF-8.

I wrote some code to do this that I can probably donate / integrate if
a decision is made to actually do this checking. It does a reasonable
job, checking for illegal surrogates and as well as codepoints encoded
with more bytes than necessary, along with basic UTF-8 checking. It's
all very simple, so it runs fast.

Terry

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Re: Corrupt log message in repository

Posted by Branko Cibej <br...@xbc.nu>.
Quoting Mark Benedetto King <mb...@lowlatency.com>:

> On Mon, Mar 01, 2004 at 12:25:24AM -0800, Garrick Olson wrote:
> > 
> > This still seems like an svn bug to me.  Shouldn't the *server* enforce
> > any of these kinds of conventions a client must follow?
> > 
> 
> How would you propose that the server completely enforce the
> convention that the client use a particular encoding?

In the case of log messages (and other text properties), the server can easily
check if the byte sequence is valid UTF-8.



-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Re: Corrupt log message in repository

Posted by Mark Benedetto King <mb...@lowlatency.com>.
On Mon, Mar 01, 2004 at 12:25:24AM -0800, Garrick Olson wrote:
> 
> This still seems like an svn bug to me.  Shouldn't the *server* enforce
> any of these kinds of conventions a client must follow?
> 

How would you propose that the server completely enforce the convention
that the client use a particular encoding?

--ben


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org