bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3230: 23.0.93; Make dired-actual-switches safe local variable?


From: Leo
Subject: bug#3230: 23.0.93; Make dired-actual-switches safe local variable?
Date: Thu, 24 Feb 2011 12:46:40 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.94 (Mac OS X 10.6.6)

On 2011-02-24 10:08 +0800, Glenn Morris wrote:
> As it stands, it emphatically should NOT be marked safe. Example:
[...]
>
> Oh dear, arbitrary shell command executed with permissions of the user
> running Emacs.

Looks like a bug in the way dired-actual-switches is used. Should we
devise a function to check every switch in dired-actual-switches is
actual a switch?

(defun dired-actual-switches-p (switches)
  (assert (stringp switches))
  (mapc
   (lambda (switch)
     (assert (eq (aref switch 0) ?-)))
   (split-string switches nil t)))

(put 'dired-actual-switches 'safe-local-variable 'dired-actual-switches-p)

Leo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]