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

Re: svn log causes XML parse error (internal error)

From: Julian Reschke <julian.reschke_at_gmx.de>
Date: 2004-07-20 09:59:22 CEST

Klaus Rennecke wrote:

> If encoding names, I think the best approach would be to URL-encode
> them. Base64 bloats the text even if it's totally fine, but URL-encoding
> would leave the polite names readable.

I think it would be really great if we'd have a clear understanding
about where the problem lies (I don't yet). In WebDAV's XML
request/response bodies, filenames never occur. WebDAV uses URIs, and
URIs are plain ASCII.

If there *are* other parts of message bodies (properties?) that
transport filenames, it's absolutely a good idea to use URI-escaping for
those.

> That goes for file and property names alike.
>
> As for the dangers of control characters: File names have been an attack
> vector on unix for a loong time. Root guys should be aware of that, with
> or without subversion.
>
> The standard approach is to display a ? in place of control characters
> for user output. In this case however, I think it would be easier (like,
> no-op) to just leave the URL-encoded string as-is except for actually
> creating the files. And this would have the added bonus that wrapping
> tools had a real chance at safely parsing it.
>
> This would allow spaces in the property names as well. I think there was
> at least one request on users@ about this. It will not break the skel
> syntax if you just leave it URL-encoded in the database. All existing
> properties except the ones with enclosed % characters will remain
> unaffected.

Control characters (and other non-name characters) in property names are
deeply incompatible with WebDAV and also other metadata formats (such as
RDF or DC). I think it's a very bad idea to introduce them.

The wish to introduce spaces in names often comes from people using a
property name for *display* purposes. That's the wrong approach. If you
need user-friendly display, you'll need to think about I18N as well;
just adding whitespace doesn't solve that (think about that: do variable
names in programming languages allow whitespace?).

Best regards, Julian

-- 
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 20 09:59:50 2004

This is an archived mail posted to the Subversion Dev mailing list.