File Issue-5243-2-Let-get-editor-use-shell-quote-argument.diff of Package lilypond.8109
From: David Kastrup <dak@gnu.org>
Date: Tue, 28 Nov 2017 11:19:02 +0000 (+0100)
Subject: Issue 5243/2: Let get-editor use shell-quote-argument
X-Git-Url: http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commitdiff_plain;h=39f800a7e5acb7cc5da6424c99fd2690e389495a
Issue 5243/2: Let get-editor use shell-quote-argument
Addresses security concerns.
---
Index: scm/editor.scm
===================================================================
--- scm/editor.scm.orig 2018-05-15 10:48:31.408441118 +0200
+++ scm/editor.scm 2018-05-15 10:49:06.949571451 +0200
@@ -169,7 +169,7 @@ See Info node `(elisp)Security Considera
(let* ((editor (get-editor))
(template (get-command-template editor-command-template-alist editor))
(command
- (re-sub "%\\(file\\)s" (format #f "~S" file-name)
+ (re-sub "%\\(file\\)s" (shell-quote-argument file-name)
(re-sub "%\\(line\\)s" (format #f "~a" line)
(re-sub "%\\(char\\)s" (format #f "~a" char)
(re-sub