[COMPASS-6259] Investigate changes in NODE-4769: Remove ISO-8859-1 string support from Binary class Created: 26/Oct/22  Updated: 01/Feb/23  Resolved: 01/Feb/23

Status: Closed
Project: Compass
Component/s: None
Affects Version/s: None
Fix Version/s: No version

Type: Investigation Priority: Major - P3
Reporter: PM Bot Assignee: Unassigned
Resolution: Done Votes: 0
Labels: node-driver
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on NODE-4769 Remove ISO-8859-1 string support from... Closed
Documentation Changes: Not Needed

 Description   

AC

  • Audit all usages of 'binary', 'latin1', and 'ascii' as encodings for constructing a node buffer.
  • Binary
    • Within the constructor remove creating a buffer from the 'binary' encoding (Buffer.from(buffer, 'binary');).
    • Open question do we remove support for string inputs? Or do we want to instead change the encoding to utf8? Answer: no we are going to disallow strings as input.
    • Add a condition to detect string input and throw a meaningful message. (without this string should still crash due to the constructor only expecting Buffer inputs)
  • Remove ISO-8859-1 string format support from Binary class methods and constructor
  • Update tests


 Comments   
Comment by Maurizio Casimirri [ 01/Feb/23 ]

Should be part of the documentation of Mongosh v2

Generated at Wed Feb 07 22:42:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.