We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0917068 commit a8c31d4Copy full SHA for a8c31d4
pkg/httpserver/sandboxfs.go
@@ -6,11 +6,13 @@ import (
6
"path/filepath"
7
)
8
9
+// SandboxFileSystem implements superbasic security checks
10
type SandboxFileSystem struct {
11
fs http.FileSystem
12
RootFolder string
13
}
14
15
+// Open performs basic security checks before providing folder/file content
16
func (sbfs SandboxFileSystem) Open(path string) (http.File, error) {
17
abspath, err := filepath.Abs(filepath.Join(sbfs.RootFolder, path))
18
if err != nil {
0 commit comments