Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Invalid uri character when the URL path contains chinese characters #5391

Open
1 task
photino opened this issue Dec 5, 2024 · 1 comment
Open
1 task
Labels
bug Something isn't working

Comments

@photino
Copy link
Contributor

photino commented Dec 5, 2024

Describe the bug

We are using the OSS service. When deleting a path contains chinese characters, it throws an error:

Unexpected (permanent) at List::next, context: { called: reqsign::Sign, service: oss, path: 中文目录/, listed: 0 } => signing http request, source: invalid uri character

Steps to Reproduce

let mut builder = Oss::default()
        .root("/path/to/dir")
        .bucket("test")
        .endpoint("https://oss-cn-beijing.aliyuncs.com")
        .access_key_id("access_key_id")
        .access_key_secret("access_key_secret");;
let op: Operator = Operator::new(builder)?.finish();
operator.remove_all("中文目录/").await.unwrap();

Expected Behavior

Should work successfully.

Additional Context

OpenDAL version: 0.50.2

Are you willing to submit a PR to fix this bug?

  • Yes, I would like to submit a PR.
@photino photino added the bug Something isn't working label Dec 5, 2024
@Xuanwo
Copy link
Member

Xuanwo commented Dec 5, 2024

Thank you, @photino, for reporting the bug. I have confirmed that it is indeed an issue caused by reqsign, where the query is not encoded correctly like s3.

https://github.com/Xuanwo/reqsign/blob/13c22a1b0a2609862c1dcb9b42647cf5b270fd31/src/aws/v4.rs#L347-L360

I will get it fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants