erofs-utils: lib: tar: fix LIBARCHIVE.xattr URL-encoded keys
authorGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 26 Dec 2024 04:58:08 +0000 (12:58 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 26 Dec 2024 05:22:49 +0000 (13:22 +0800)
commit7a7fe11628903122a106ce411d87e0777da4e516
tree3f7814c52daa5f8f49598ce8d48d17dc6966cdd9
parent5e771458ef72fa958da1c31cb42e1086033bcbf9
erofs-utils: lib: tar: fix LIBARCHIVE.xattr URL-encoded keys

As tar(5) [1] mentioned: `The key value is URL-encoded: All non-ASCII
characters and the two special characters "=" and "%" are encoded as
"%" followed by two uppercase hexadecimal digits.`

Fix it now.

[1] https://man.freebsd.org/cgi/man.cgi?tar(5)

Fixes: c0063a73b01b ("erofs-utils: lib: support importing xattrs from tarerofs")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20241226045808.95101-3-hsiangkao@linux.alibaba.com
lib/tar.c