Relax Path Validation to Allow Any Percent-Encoded Sequence #2355
Labels
enhancement
Any new improvement worthy of a entry in the changelog
object-store
Object Store Interface
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 extensionPath::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:
object_store
does not consider illegal Accessing a file with a percent-encoded name on the filesystem with ObjectStore LocalFileSystem #2349%
but not as part of a percent encoded sequenceDescribe 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 differentlyPath::parse
should accept any "safe" path, even if it would not itself generate that path.Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: