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

Re: svn commit invokes $EDITOR not where svn run from

From: Marcus Comstedt <marcus_at_mc.pp.se>
Date: 2002-08-08 18:55:40 CEST

Philip Martin <philip@codematters.co.uk> writes:

> Having said it might be easy, now I'm not so sure. Suppose I try
>
> $ mkdir /tmp/\;rm\ -rf\ /
> $ TMPDIR="/tmp/;rm -rf /" svn ci

The environment variable case was for W*ndows, and as I understood
Mike you would be passing

  editor.exe %TMPDIR%\foobar.txt

and not the expansion of the variable. The UNIX equivalent would be
to call system on the string

  emacs "$TMPDIR"/foobar.txt

which works regardless of which characters are inside $TMPDIR. (At
least from a quoting standpoint. Emacs could still interpret its
argument as an option instead of as a path to open, if it starts with
-.)

If this was _not_ what Mike meant, he probably misunderstood my
original question, which was essentially "can't the path to the
tempdir contain unsafe characters on W*ndows". On UNIX, we can just
use "/tmp", which is known to contain no unsafe characters.

The way we get away with using system() is that we _know_ that the
path contains no characters that need quoting. Prepending it with an
expanded tempdir path that could contain unsafe characters would bring
us right back to square one.

  // Marcus

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Aug 8 19:02:48 2002

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.