You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, we all walking up to a parent directory using .. for convenience. However, we allow this behavior in two cases where it doesn't really make sense:
After a terminal file. That is, /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme/../readme works. Unfortunately, fixing this without simply removing parent directory traversal may be a bit difficult.
At the root. That is, /ipfs/QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o/../QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme. Actually, we allow any number of .. at the root: `/ipfs/QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o/../../../adsf/../../../QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme'.
I'm bringing this up because it can make security hard to reason about. That is, if someone naively parses /ipfs/QmGood/../QmBad/badCode and verifies that QmGood is trusted, they'll fetch badCode without realizing it. It was only dumb luck that prevented this from being an issue for the gateway @kyledrake is working on (a gateway with proper security origins).
The text was updated successfully, but these errors were encountered:
Version information:
Type:
Bug
Severity:
Low
Description:
Currently, we all walking up to a parent directory using
..
for convenience. However, we allow this behavior in two cases where it doesn't really make sense:/ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme/../readme
works. Unfortunately, fixing this without simply removing parent directory traversal may be a bit difficult./ipfs/QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o/../QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme
. Actually, we allow any number of..
at the root: `/ipfs/QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o/../../../adsf/../../../QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme'.I'm bringing this up because it can make security hard to reason about. That is, if someone naively parses
/ipfs/QmGood/../QmBad/badCode
and verifies thatQmGood
is trusted, they'll fetchbadCode
without realizing it. It was only dumb luck that prevented this from being an issue for the gateway @kyledrake is working on (a gateway with proper security origins).The text was updated successfully, but these errors were encountered: