Skip to content

fix: Allow to access path inside manifest that contains spaces#1008

Open
speeddragon wants to merge 2 commits into
edgefrom
fix/manifest_path_with_space
Open

fix: Allow to access path inside manifest that contains spaces#1008
speeddragon wants to merge 2 commits into
edgefrom
fix/manifest_path_with_space

Conversation

@speeddragon

Copy link
Copy Markdown
Collaborator

Accessing https://arweave.net/jD52P9VXPR_-o_VwLOu_zkfvc7VM1shmXZBS-MMddmo/Hora%20Bora%20cover.png returns 404 because the Hora%20Bora%20cover.png part gets splited to Hora and only then is checked in the path.

{resolve, Subpath} -> {resolve, Subpath};
Part ->
case part([$&, $~, $+, $ , $=], Part) of
case part([$&, $~, $+, $=], Part) of

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was here because upstream +s were coming out as somehow. Please can you check rigorously that the + still works from browsers etc?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the use case + only for type definition? Eg to+integer=3. I will try to understand how + can be used outside of this example.

@speeddragon speeddragon Jul 8, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a test to check + inside a key value (key=8+8 to be "8 8")
I think after this PR, the failing cases are:

  • Literal + in path segments: still potentially unsafe because + is syntax.
  • + in query keys: intentionally supported for typed params, but can collide with literal-space query keys.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Literal + in path segments: still potentially unsafe because + is syntax.

This is 100% right. The + is syntax in path parts. Hard to see how we could build a non-weird, low WTFs/min scheme that supported both +type and +other stuff.

But isn't the problem upstream? Why were some paths coming with space becoming +? Or the answer is that 'whatever it was, it doesn't any more'?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Browsers convert a plus sign (+) to a space when decoding data submitted through an HTML form with the standard application/x-www-form-urlencoded content type.

So if the page is serving a form, the value of that form will generate + instead of a space when sending the data via a GET request.

But looks like everything works as before (convert to a type, like test typed_key_test), and this just affects the split of the value inside a key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants