1
0

FS syscalls require "fs" permission

This commit is contained in:
Zef Hemel 2022-07-11 13:50:55 +02:00
parent d8377ac1dd
commit 3409a1215e

View File

@ -113,10 +113,7 @@ export class ExpressServer {
// The cron hook // The cron hook
this.system.addHook(new NodeCronHook()); this.system.addHook(new NodeCronHook());
// Register syscalls available on the server sid // Register syscalls available on the server side
this.system.registerSyscalls(["shell"], shellSyscalls(options.pagesPath));
// YOLO
this.system.registerSyscalls([], fileSystemSyscalls("/"));
this.system.registerSyscalls( this.system.registerSyscalls(
[], [],
pageIndexSyscalls(this.db), pageIndexSyscalls(this.db),
@ -129,6 +126,9 @@ export class ExpressServer {
sandboxSyscalls(this.system), sandboxSyscalls(this.system),
jwtSyscalls() jwtSyscalls()
); );
// Danger zone
this.system.registerSyscalls(["shell"], shellSyscalls(options.pagesPath));
this.system.registerSyscalls(["fs"], fileSystemSyscalls("/"));
// Register the HTTP endpoint hook (with "/_/<plug-name>"" prefix, hardcoded for now) // Register the HTTP endpoint hook (with "/_/<plug-name>"" prefix, hardcoded for now)
this.system.addHook(new EndpointHook(this.app, "/_")); this.system.addHook(new EndpointHook(this.app, "/_"));