js-bson - PR #907: fix: respect Binary position in toExtendedJSON

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: BSON, EJSON
    • 2
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

       

      Expected Behavior

      As a user of js-bson
      I expect only written bytes of a Binary to be encoded
      When calling toExtendedJSON

      Actual Behavior and Impact

      • calling toExtendedJSON will base64 document values representing the full underlying buffer for binary types, not just the data therein.
      • No known customer reports today.

      Dependencies

      • None

      Risks/Unknowns

      • Any consumer that was inadvertently relying on the padded base64 output (e.g., reading the full 256-byte allocation) would see a breaking change in serialized output.

      Acceptance Criteria

      Implementation Requirements

      • Base64 of a binary should be representative of only the portion of the buffer that actually has data (IE: respect the 'position')

      Testing Requirements

      • None (already present in the external PR)

      Documentation Requirements

      • None

      Follow Up Requirements

      • None

       

       

            Assignee:
            Johnathan Martell
            Reporter:
            TPM Jira Automations Bot
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: