do not trust require spec from user code
svn: r7343
This commit is contained in:
parent
45649900e7
commit
eb72a0dd93
|
@ -245,13 +245,14 @@
|
||||||
(directory-list "/tmp") =err> "file access denied"
|
(directory-list "/tmp") =err> "file access denied"
|
||||||
--top--
|
--top--
|
||||||
;; should work also for module evaluators
|
;; should work also for module evaluators
|
||||||
(set! ev (make-evaluator `(module foo mzscheme
|
;; --> NO! Shouldn't make user code require whatever it wants
|
||||||
(require (file ,test-lib)))))
|
;; (set! ev (make-evaluator `(module foo mzscheme
|
||||||
--eval--
|
;; (require (file ,test-lib)))))
|
||||||
x => 123
|
;; --eval--
|
||||||
(length (with-input-from-file ,test-lib read)) => 5
|
;; x => 123
|
||||||
;; the directory is still not kosher
|
;; (length (with-input-from-file ,test-lib read)) => 5
|
||||||
(directory-list "/tmp") =err> "file access denied"
|
;; ;; the directory is still not kosher
|
||||||
|
;; (directory-list "/tmp") =err> "file access denied"
|
||||||
--top--
|
--top--
|
||||||
;; explicitly allow access to /tmp
|
;; explicitly allow access to /tmp
|
||||||
(set! ev (let ([rx (if (eq? 'windows (system-type))
|
(set! ev (let ([rx (if (eq? 'windows (system-type))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user