From 64be5de75f42e415198ff5e77de509680b69e0e1 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 19 Dec 2021 14:43:56 +0100 Subject: 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 --- tests/xattr/xattr_integration_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') 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) + } +} -- cgit v1.2.3