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

Re: issue #1796

From: Stefan Sperling <stsp_at_elego.de>
Date: Sun, 25 May 2008 12:07:38 +0200

On Sun, May 25, 2008 at 12:21:19AM +0200, Neels Janosch Hofmeyr wrote:
> So, we've got the subversion server (libsvn_repos) which accepts
> any garbage written in commit log messages. It doesn't enforce
> consistent line endings, and, AFAIK, neither does it check whether the
> log is valid UTF8, which it should be according to spec.

> So, I would like to check incoming log messages (or even all incoming
> svn: prop values, depending on whether this is nice) for their
> compliance with UTF-8 and LF line ending style.

Why not try to normalise the log message on the server?

Couldn't we run the log message through a function like
svn_utf_stringbuf_to_utf8() and raise an error if that function fails?

If the function fails, the log message failed to validate.
If it does not, the user won't get an error and the log message will
be in UTF-8.

Similarly for line endings -- I'm not 100% certain, but it looks like
svn_subst_translate_to_normal_form() or
svn_subst_stream_translated_to_normal_form() may help.

We should make sure that the server returns some meaningful error
to the client if it's impossible to normalise the log message.
You might have to declare a new error code in
subversion/include/svn_error_codes.h, if there's no suitable one already.

Happy hacking,
Stefan

  • application/pgp-signature attachment: stored
Received on 2008-05-25 12:05:26 CEST

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.