]> git.eshelyaron.com Git - emacs.git/commit
Trim and explain set of safe forms for 'unsafep' (bug#44018)
authorMattias Engdegård <mattiase@acm.org>
Sat, 31 Oct 2020 10:35:06 +0000 (11:35 +0100)
committerMattias Engdegård <mattiase@acm.org>
Sat, 31 Oct 2020 12:42:07 +0000 (13:42 +0100)
commitc3a20804a81826ec091a4a096c1987a61e412580
tree0cf4216fe7bd30a49ec1efc2660c91869cf16c38
parenta78c6141bc1a34622894af3cee45f350e3b629ac
Trim and explain set of safe forms for 'unsafep' (bug#44018)

* lisp/emacs-lisp/unsafep.el:
Add comment explaining the policy for which forms can be considered
'safe' in the sense of unsafep.  Remove ones that didn't make the cut:

 play-sound-file (large attack surface)
 catch, throw (alter program flow, inject data)
 replace-regexp-in-string (execute arbitary code)
 error, signal (deceptive messages)

* test/lisp/emacs-lisp/unsafep-tests.el (unsafep-tests--unsafe):
Add test cases.
* etc/NEWS: Announce the change.
etc/NEWS
lisp/emacs-lisp/unsafep.el
test/lisp/emacs-lisp/unsafep-tests.el