3 ms·
I see it claiming to have a sandbox but at the same time it seems to allow the program to read and write arbitrary files? open(File, Mode, Stream, Options)
by yencabulator 5y ago
I see it claiming to have a sandbox but at the same time it seems to allow the program to read and write arbitrary files?
open(File, Mode, Stream, Options)
https://github.com/ichiban/prolog/blob/8e3dafd6d29334417a793f38df71190d9e584f06/engine/stream.go#L137-L154 https://github.com/ichiban/prolog/blob/8e3dafd6d29334417a793...
- yichiban 5y agoGood point! `open(File, Mode, Stream, Options)` and other builtin predicates are available if you construct an interpreter with `p := prolog.New(nil, nil)`. On the other hand, `p := new(prolog.Interpreter)` constructs a sandbox interpreter without any builtin predicates. You can explicitly register builtin predicates as you wish.