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

Relax Path Validation to Allow Any Percent-Encoded Sequence #2355

Closed
tustvold opened this issue Aug 7, 2022 · 0 comments · Fixed by #2356
Closed

Relax Path Validation to Allow Any Percent-Encoded Sequence #2355

tustvold opened this issue Aug 7, 2022 · 0 comments · Fixed by #2356
Labels
enhancement Any new improvement worthy of a entry in the changelog object-store Object Store Interface

Comments

@tustvold
Copy link
Contributor

tustvold commented Aug 7, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

The current validation performed by PathPart::parse and by extension Path::parse returns an error if the provided string does not round-trip. In particular it decodes the string, re-encodes it, and if the result does not equal the original string, it returns an error.

This is safe, but can lead to surprises when interacting with other systems. In particular it will return an error for:

Describe the solution you'd like

There is no reason not to permit these paths, especially in the former case where they are arguably more safe than the paths generated by object_store. To phrase it differently Path::parse should accept any "safe" path, even if it would not itself generate that path.

Describe alternatives you've considered

Additional context

@tustvold tustvold added the enhancement Any new improvement worthy of a entry in the changelog label Aug 7, 2022
tustvold added a commit to tustvold/arrow-rs that referenced this issue Aug 7, 2022
tustvold added a commit to tustvold/arrow-rs that referenced this issue Aug 7, 2022
tustvold added a commit that referenced this issue Aug 8, 2022
* Relax path validation (#2355)

* Iterate over bytes
@alamb alamb added the object-store Object Store Interface label Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog object-store Object Store Interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants