Skip to content

Commit a8c31d4

Browse files
committed
adding missing comments
1 parent 0917068 commit a8c31d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/httpserver/sandboxfs.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import (
66
"path/filepath"
77
)
88

9+
// SandboxFileSystem implements superbasic security checks
910
type SandboxFileSystem struct {
1011
fs http.FileSystem
1112
RootFolder string
1213
}
1314

15+
// Open performs basic security checks before providing folder/file content
1416
func (sbfs SandboxFileSystem) Open(path string) (http.File, error) {
1517
abspath, err := filepath.Abs(filepath.Join(sbfs.RootFolder, path))
1618
if err != nil {

0 commit comments

Comments
 (0)