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

denylist: ?format=car does not skip directly blocked CIDs #10361

Open
3 tasks done
lidel opened this issue Mar 1, 2024 · 0 comments
Open
3 tasks done

denylist: ?format=car does not skip directly blocked CIDs #10361

lidel opened this issue Mar 1, 2024 · 0 comments
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization

Comments

@lidel
Copy link
Member

lidel commented Mar 1, 2024

Checklist

Installation method

built from source

Version

0.26

Config

default

Description

?format=car does not skip directly blocked CIDs.

Repro in commented block of #10360:

/* TODO: this was already broken in 0.26, but we should fix it
t.Run("Gateway returns CAR without directly blocked CID", func(t *testing.T) {
allowedDirWithDirectlyBlockedCID := node.IPFS("add", "--raw-leaves", "-Q", "-rw", filepath.Join(h.Dir, "directly-blocked-file.txt")).Stdout.Trimmed()
resp := client.Get("/ipfs/" + allowedDirWithDirectlyBlockedCID + "?format=car")
assert.Equal(t, http.StatusOK, resp.StatusCode)
bs, err := carstore.NewReadOnly(strings.NewReader(resp.Body), nil)
assert.NoError(t, err)
has, err := bs.Has(context.Background(), cid.MustParse(blockedCID))
assert.NoError(t, err)
assert.False(t, has, "Returned CAR should not include blockedCID")
})
*/

@lidel lidel added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Mar 1, 2024
@lidel lidel moved this to 🥞 Todo in IPFS Shipyard Team Mar 1, 2024
@hacdias hacdias mentioned this issue Mar 1, 2024
11 tasks
@hacdias hacdias mentioned this issue Apr 11, 2024
9 tasks
@lidel lidel mentioned this issue May 28, 2024
32 tasks
@lidel lidel mentioned this issue Aug 28, 2024
34 tasks
@gammazero gammazero mentioned this issue Oct 17, 2024
28 tasks
@lidel lidel mentioned this issue Nov 14, 2024
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization
Projects
No open projects
Status: 🥞 Todo
Development

No branches or pull requests

1 participant