Add checkbox folder browsers
This commit is contained in:
@@ -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