diff options
author | Jakob Unterwurzacher | 2021-06-02 14:21:30 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-06-02 14:29:48 +0200 |
commit | 04858ddd222bbf7156f33f99cfb293a9b1e15ec8 (patch) | |
tree | 732cbf83c9d842a911d515abbad7c153c4159354 /internal/fusefrontend/xattr_unit_test.go | |
parent | 242cdf966f262b2e20785eb0ff49ac55a8bd4636 (diff) |
nametransform: check name validity on encryption
xfstests generic/523 discovered that we allowed to set
xattrs with "/" in the name, but did not allow to read
them later.
With this change we do not allow to set them in the first
place.
Diffstat (limited to 'internal/fusefrontend/xattr_unit_test.go')
-rw-r--r-- | internal/fusefrontend/xattr_unit_test.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/fusefrontend/xattr_unit_test.go b/internal/fusefrontend/xattr_unit_test.go index f6c0469..a0cf4c8 100644 --- a/internal/fusefrontend/xattr_unit_test.go +++ b/internal/fusefrontend/xattr_unit_test.go @@ -33,7 +33,10 @@ func newTestFS(args Args) *RootNode { func TestEncryptDecryptXattrName(t *testing.T) { fs := newTestFS(Args{}) attr1 := "user.foo123456789" - cAttr := fs.encryptXattrName(attr1) + cAttr, err := fs.encryptXattrName(attr1) + if err != nil { + t.Fatal(err) + } t.Logf("cAttr=%v", cAttr) attr2, err := fs.decryptXattrName(cAttr) if attr1 != attr2 || err != nil { |