Uploaded image for project: 'Compass '
  1. Compass
  2. COMPASS-6258

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

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 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 Unassigned
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: