Skip to content

Commit 1b4dc46

Browse files
lu4nxEli-Zaretskii
authored andcommitted
Fix htmlfontify.el command injection vulnerability.
* lisp/htmlfontify.el (hfy-text-p): Fix command injection vulnerability. (Bug#60295)
1 parent 1fe4b98 commit 1b4dc46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lisp/htmlfontify.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1850,7 +1850,7 @@ Hardly bombproof, but good enough in the context in which it is being used."
18501850

18511851
(defun hfy-text-p (srcdir file)
18521852
"Is SRCDIR/FILE text? Use `hfy-istext-command' to determine this."
1853-
(let* ((cmd (format hfy-istext-command (expand-file-name file srcdir)))
1853+
(let* ((cmd (format hfy-istext-command (shell-quote-argument (expand-file-name file srcdir))))
18541854
(rsp (shell-command-to-string cmd)))
18551855
(string-match "text" rsp)))
18561856

0 commit comments

Comments
 (0)