Skip to content

Commit

Permalink
Fix potential 'vulnerability' by disabling *read-eval* while reading …
Browse files Browse the repository at this point in the history
…bookmarks.
  • Loading branch information
knusbaum committed Apr 18, 2018
1 parent 3031a1f commit 8842cb7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bookmarks.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
(defun read-bookmarks (fname)
(handler-case
(with-open-file (is fname)
(let ((gopher-lines (read is)))
(make-instance 'bookmarks
:bookmarks (cl-gopher:gopher-lines-from-alist gopher-lines))))
(let ((*read-eval* nil))
(let ((gopher-lines (read is)))
(make-instance 'bookmarks
:bookmarks (cl-gopher:gopher-lines-from-alist gopher-lines)))))
(file-error (e)
(declare (ignore e))
nil)))
Expand Down

0 comments on commit 8842cb7

Please sign in to comment.