Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NODE-3627): Enable flexible BSON validation for server error key containing invalid utf-8 #3054

Merged
merged 10 commits into from
Nov 30, 2021

Conversation

gjchong25
Copy link
Contributor

@gjchong25 gjchong25 commented Nov 23, 2021

Description

This change allows for validation toggling on the writeErrors key, which can contain a server error message which has invalid utf-8, thus causing the user to get an invalid utf-8 error rather than the corresponding server error. Unit tests using a real server error response are added to make sure the invalid utf-8 error is not being thrown when validation on the writeErrors key is turned off.

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: <type>(NODE-xxxx)<!>: <description>
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@gjchong25 gjchong25 marked this pull request as ready for review November 23, 2021 19:47
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Nov 23, 2021
src/cmap/commands.ts Outdated Show resolved Hide resolved
test/unit/commands.test.ts Outdated Show resolved Hide resolved
test/unit/commands.test.ts Outdated Show resolved Hide resolved
durran
durran previously approved these changes Nov 24, 2021
Copy link
Member

@durran durran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thanks!

@gjchong25 gjchong25 changed the title feat(NODE-3627): Enable flexible BSON validation for server error key containing invalid utf-8 fix(NODE-3627): Enable flexible BSON validation for server error key containing invalid utf-8 Nov 24, 2021
@durran durran added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Nov 29, 2021
src/cmap/commands.ts Outdated Show resolved Hide resolved
src/cmap/commands.ts Outdated Show resolved Hide resolved
src/cmap/commands.ts Outdated Show resolved Hide resolved
src/cmap/commands.ts Show resolved Hide resolved
Copy link
Contributor

@dariakp dariakp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @gjchong25 and @nbbeeken both!

@nbbeeken nbbeeken merged commit 7a507f0 into main Nov 30, 2021
@nbbeeken nbbeeken deleted the NODE-3627 branch November 30, 2021 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants