Skip to content

feature: increase user-configurable CBOR limit for MaxArrayElements and MaxMapPairs #207

Closed
@x448

Description

@x448
Contributor

Is your feature request related to a problem? Please describe.

Current limit of DecOptions.MaxArrayElements and DecOptions.MaxMapPairs is:

  • default limit = 131072
  • max limit user can set = 134217728

At least one project already set limits to the max allowed. Also, schema-less binary formats like CBOR will be used in large systems and for use cases not initially anticipated.

Describe the solution you'd like

Continue to keep default limits reasonably safe & usable, only increase user-configurable max.

Increase limit of DecOptions.MaxArrayElements and DecOptions.MaxMapPairs to:

  • default limit = 131072 (unchanged)
  • max limit user can set = 2147483647 (0x7FFFFFFF)

Describe alternatives you've considered

  • Ignore this until a user requests an increase.
  • Other (smaller) values were too arbitrary compared to the largest positive signed 32-bit int.

Activity

added this to the v2.3.0 milestone on Apr 3, 2020
added a commit that references this issue on May 4, 2020
c06deeb
added a commit that references this issue on May 4, 2020
0b811b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

      Development

      Participants

      @fxamacker@x448

      Issue actions

        feature: increase user-configurable CBOR limit for MaxArrayElements and MaxMapPairs · Issue #207 · fxamacker/cbor