diff options
author | Jakob Unterwurzacher | 2021-12-19 14:43:56 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-12-19 14:43:56 +0100 |
commit | 64be5de75f42e415198ff5e77de509680b69e0e1 (patch) | |
tree | 8897db6d0de0a4c11921bba72de621e30f0ce501 /tests | |
parent | eb42e541828336e9b19e1bc5e087a419835b0c85 (diff) |
fusefrontend: allow slashes in xattr names
xattr names have fewer restrictions than file names,
relax the validation.
Fixes https://github.com/rfjakob/gocryptfs/issues/627
Diffstat (limited to 'tests')
-rw-r--r-- | tests/xattr/xattr_integration_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/xattr/xattr_integration_test.go b/tests/xattr/xattr_integration_test.go index efe903b..c968a47 100644 --- a/tests/xattr/xattr_integration_test.go +++ b/tests/xattr/xattr_integration_test.go @@ -369,3 +369,17 @@ func TestAcl(t *testing.T) { t.Error(err) } } + +// TestSlashInName checks that slashes in xattr names are allowed +// https://github.com/rfjakob/gocryptfs/issues/627 +func TestSlashInName(t *testing.T) { + fn := test_helpers.DefaultPlainDir + "/" + t.Name() + err := ioutil.WriteFile(fn, []byte("12345"), 0700) + if err != nil { + t.Fatalf("creating empty file failed: %v", err) + } + err = setGetRmList3(fn, "user.foo@https://bar", []byte("val")) + if err != nil { + t.Error(err) + } +} |