-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ObjectId): will now throw if an invalid character is passed
If a non-hex string of length 12 is passed into the ObjectId constructor, we generate a hexString based off of the character codes of the passed in id. This requires that the passed id consist entirely of characters with values < 256 in utf-16. Previously, we let this silently fail and generated invalid hex string. Now, we throw a TypeError Fixes NODE-1737 BREAKING CHANGE: Where code was previously silently erroring, users may now experience TypeErrors
- Loading branch information
1 parent
c6701fc
commit 6f30b4e
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters