/[Apache-SVN]
ViewVC logotype

Revision 1874057


Jump to revision: Previous Next
Author: jamessan
Date: Sat Feb 15 16:24:53 2020 UTC (4 years, 9 months ago)
Changed paths: 2
Log Message:
Escape filenames when invoking $SVN_EDITOR

Per https://subversion.apache.org/faq.html#svn-editor, $SVN_EDITOR is invoked
through the shell instead of directly executed.  The user is expected to
properly escape/quote $SVN_EDITOR, but svn was putting the filename directly
into the command without any escaping.  This therefore breaks attempts to,
e.g., run the editor from the merge conflict dialog when a path has special
characters.

Update locations where we invoke the editor to quote the filename as well as
escape shell special characters using apr_pescape_shell().  The quotes are
needed in addition to the escaping, since apr_pescape_shell() does not escape
whitespace.

* subversion/libsvn_subr/cmdline.c
  (svn_cmdline__edit_file_externally, svn_cmdline__edit_string_externally):
   Quote and escape, via apr_pescape_shell(), the filename in the command line.
* subversion/tests/cmdline/update_test.py
  (update_accept_conflicts): Rename "A/D/G/pi" to "A/D/G/p i" before performing
   the merge, so the test exercises the changes above.


Changed paths

Path Details
Directorysubversion/trunk/subversion/libsvn_subr/cmdline.c modified , text changed
Directorysubversion/trunk/subversion/tests/cmdline/update_tests.py modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26