onflow / flow-go

A fast, secure, and developer-friendly blockchain built to support the next generation of games, apps, and the digital assets that power them.
GNU Affero General Public License v3.0
532 stars 177 forks source link

Use more restrictive decode mode in global CBOR Decoder #5534

Open jordanschalm opened 8 months ago

jordanschalm commented 8 months ago

Context

The CBOR library provides an option to return an error while decoding if the input has a field which does not exist in the target Go struct. We should globally enable this option by default in flow-go as it avoids some surface area for spam which currently exists. In particular, a malicious sender can bloat the size of a message without it being detected:


Definition of Done

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.