Investigate changes in NODE-4770: Remove UTF8 length 12 strings from ObjectId constructor

XMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Done
    • Priority: Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • Not Needed

      Details

      As of v4.2.0 ObjectId's began interpreting strings of length 12 as UTF8 instead of latin1. We should remove support for strings that aren't exactly hex strings to make construction from string input clear and lack a variation of interpretations.

      AC

      • Only allow strings of length 24 that contain hex characters
      • Remove strings of length 12 from objectId constructor
      • Update tests

              Assignee:
              Unassigned
              Reporter:
              TPM Jira Automations Bot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: