config/patches/base/ipfs/ipfs-unsafe-allow-all-paths-for-filestore.patch

15 lines
667 B
Diff
Raw Normal View History

2022-02-05 21:42:36 +02:00
diff --git a/vendor/github.com/ipfs/go-filestore/fsrefstore.go b/vendor/github.com/ipfs/go-filestore/fsrefstore.go
2022-03-05 17:00:37 +02:00
index 9eb2b43..43e336c 100644
2022-02-05 21:42:36 +02:00
--- a/vendor/github.com/ipfs/go-filestore/fsrefstore.go
+++ b/vendor/github.com/ipfs/go-filestore/fsrefstore.go
2022-03-05 17:00:37 +02:00
@@ -291,9 +291,6 @@ func (f *FileManager) putTo(ctx context.Context, b *posinfo.FilestoreNode, to pu
2022-02-05 21:42:36 +02:00
return ErrFilestoreNotEnabled
}
2022-03-05 17:00:37 +02:00
//lint:ignore SA1019 // ignore staticcheck
- if !filepath.HasPrefix(b.PosInfo.FullPath, f.root) {
2022-02-05 21:42:36 +02:00
- return fmt.Errorf("cannot add filestore references outside ipfs root (%s)", f.root)
- }
p, err := filepath.Rel(f.root, b.PosInfo.FullPath)
if err != nil {