You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/08/08 09:08:06 UTC
[GitHub] [arrow-rs] crepererum commented on a diff in pull request #2356: Relax path validation (#2355)
crepererum commented on code in PR #2356:
URL: https://github.com/apache/arrow-rs/pull/2356#discussion_r940005871
##########
object_store/src/path/parts.rs:
##########
@@ -43,21 +47,39 @@ pub struct PathPart<'a> {
impl<'a> PathPart<'a> {
/// Parse the provided path segment as a [`PathPart`] returning an error if invalid
pub fn parse(segment: &'a str) -> Result<Self, InvalidPart> {
- let decoded: Cow<'a, [u8]> = percent_decode(segment.as_bytes()).into();
- let part = PathPart::from(decoded.as_ref());
- if segment != part.as_ref() {
+ if segment == "." || segment == ".." {
Review Comment:
Could some `percent_validate` be upstreamed to `percent_encoding`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org