ipfs / protons

Protocol Buffers for Node.js and the browser without eval
Other
32 stars 23 forks source link

feat: allow limiting nested repeating fields #129

Closed achingbrain closed 10 months ago

achingbrain commented 10 months ago

Passes the limit config through to child message decoders to allow limiting the length of nested repeating fields at runtime.

E.g.

message SubMessage {
  repeated uint32 repeatedField = 1;
}

message MyMessage {
  repeated SubMessage messages = 1;
}
const message = MyMessage.decode(buf, {
  limit: {
    messages: 5 // limit messages length
    messages$: {
      repeatedField: 5 // limit `repeatedField` field of all messages in the messages field
    }
  }
})

`

github-actions[bot] commented 10 months ago

:tada: This PR is included in version 5.4.0 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:

github-actions[bot] commented 10 months ago

:tada: This PR is included in version 7.5.0 :tada:

The release is available on npm package (@latest dist-tag)

Your semantic-release bot :package::rocket:

github-actions[bot] commented 3 months ago

:tada: This issue has been resolved in version 3.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: