mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 21:35:58 +03:00
[GH-ISSUE #1443] Object names and common prefixes in listings are not URL-decoded #754
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#754
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @init-js on GitHub (Oct 7, 2020).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1443
Additional Information
The following information is very important in order to help us to help you. Omission of the following details may delay your support request or receive no attention at all.
Keep in mind that the commands we provide to retrieve information are oriented to GNU/Linux Distributions, so you could need to use others if you use s3fs on macOS or BSD
Version of s3fs being used (s3fs --version)
V1.87 (commit:
194262c)Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)
2.9.9
Kernel information (uname -r)
4.14.177-139.254.amzn2.x86_64
GNU/Linux Distribution, if applicable (cat /etc/os-release)
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
s3fs command line used, if applicable
/etc/fstab entry, if applicable
s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs)
if you execute s3fs with dbglevel, curldbg option, you can get detail debug messages
The listings have percent-encoded key names, and those don't get decoded:
Details about issue
The object listings are allowed to contain percent-encoded sequences, and those are not decoded by the function:
github.com/s3fs-fuse/s3fs-fuse@c7132b7f56/src/s3fs_xml.cpp (L120)If you have a key called
foo>barin your bucket, and you list it withaws s3api list-objects --bucket my-bucket --prefix foo, you receive<Key>foo%3Ebar</Key>on the wire. That doesn't get decoded by the function above.encoding type URL is the only encoding available.
https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html#API_ListObjects_RequestSyntax
I notice that s3fs doesn't set the
encodingTypequery parameter. Is the default then that S3 uses entity-encoding to encode that stuff?@gaul commented on GitHub (Oct 8, 2020):
I agree that s3fs should decode these responses. Could you submit a pull request to do so or try adding a test case that fails to
test/integration-test-main.sh?I don't think that
encodingTypeis relevant here. I believe this is only used for strange characters like ASCII 1-10:https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/s3/model/EncodingType.html
@gaul commented on GitHub (Feb 12, 2022):
@init-js Could you share a specific test case? I experimented with non-ASCII file and directory names and s3fs appears to do the right thing.