Closed davispuh closed 4 months ago
This looks like a duplicate of #86. One of these Torrent model columns: InfoHash, Name, FilesStatus, PieceLength, or Pieces contains a null byte (\x00
) which PostgreSQL doesn't like.
I guess dhtcrawler/persist.go
just needs to filter those before being sending to PG, or not set a column if it's just getting back only nulls from DHT. 🤔 Might be tough to reproduce if it's dependent on a random "broken" torrent in the DHT with nulls in its fields.
There was already an attempt at fixing this that was at least partially successful (see https://github.com/bitmagnet-io/bitmagnet/blob/main/internal/protocol/metainfo/banning/utf8.go).
I was thinking a particular sequence of characters might be triggering an escaping bug in Gorm but I wouldn't rule out a bug here either - needs more digging!
I think this should be fixed with the latest release but let's keep an eye on it and re-open if it's spotted again: https://github.com/bitmagnet-io/bitmagnet/releases/tag/v0.7.1
Have you checked the roadmap on the website, and existing issues, before opening a dupllcate issue? Yes
Describe the bug
Seeing this in logs
To Reproduce
No idea
Expected behavior
No errors :)
General (please complete the following information):