Add checkbox folder browsers
This commit is contained in:
1 parent
c35a183a76
commit
ebd2a8a47d
12 files changed
+173
-16
No files matched your search
@@ -0,0 +1,11 @@
|
||||
package platform
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestValidateBrowsePathRejectsUnsafePaths(t *testing.T) {
|
||||
for _, path := range []string{"", "/", "/etc", "/mnt/user/../../etc", "relative"} {
|
||||
if _, err := validateBrowsePath(path); err == nil {
|
||||
t.Fatalf("unsafe browse path accepted: %q", path)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user