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_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.
Received on 2008-05-25 12:05:26 CEST
- application/pgp-signature attachment: stored