Skip to content

Commit

Permalink
prevent reassignments of global DefaultAllowList
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan committed Aug 16, 2023
1 parent 836a67c commit 3b6a259
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion blockservice/blockservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (s *blockService) Allowlist() verifcid.Allowlist {
// session will be created. Otherwise, the current exchange will be used
// directly.
func NewSession(ctx context.Context, bs BlockService) *Session {
allowlist := verifcid.DefaultAllowlist
allowlist := verifcid.Allowlist(verifcid.DefaultAllowlist)
if bbs, ok := bs.(BoundedBlockService); ok {
allowlist = bbs.Allowlist()
}
Expand Down
2 changes: 1 addition & 1 deletion verifcid/allowlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
)

// DefaultAllowlist is the default list of hashes allowed in IPFS.
var DefaultAllowlist Allowlist = defaultAllowlist{}
var DefaultAllowlist defaultAllowlist

// Allowlist defines an interface containing list of allowed multihashes.
type Allowlist interface {
Expand Down

0 comments on commit 3b6a259

Please sign in to comment.