Validate input to WrapObject
Open
- Dominant language
- Go
- Stars
- 37
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
The CBOR library is smart and will try to serialize arbitrary types using reflection. Unfortunately, this makes it very easy to introduce silent bugs.
For example, the following *does not* panic. Instead, cbor just uses reflection to serialize `child`.
```go
child, _ := WrapObject("thing")
parent, err := WrapObject(map[string]interface{}{
"child": child, // missing a call to `.Cid()`
})
if err != nil {
panic(err)
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.