Skip to content

Commit

Permalink
Sanitize xattr values in eos (cs3org#3438)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 authored Nov 8, 2022
1 parent 68d8ceb commit aa98c9c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog/unreleased/sanitize-eos-xattr-values.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Enhancement: Sanitize non-utf8 characters in xattr values in EOS

https://github.com/cs3org/reva/pull/3438
2 changes: 1 addition & 1 deletion pkg/eosclient/eosbinary/eosbinary.go
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ func (c *Client) parseFileInfo(ctx context.Context, raw string, parseFavoriteKey
previousXAttr = strings.Replace(previousXAttr, "user.", "", 1)
}
case partsByEqual[0] == "xattrv":
attrs[previousXAttr] = partsByEqual[1]
attrs[previousXAttr] = strings.ToValidUTF8(partsByEqual[1], "")
previousXAttr = ""
default:
kv[partsByEqual[0]] = partsByEqual[1]
Expand Down

0 comments on commit aa98c9c

Please sign in to comment.