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-5289): prevent scram auth from throwing TypeError if saslprep is not a function #3727

Merged
merged 4 commits into from
Jun 16, 2023

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Jun 15, 2023

Description

What is changing?

Is there new documentation needed for these changes?

What is the motivation for this change?

saslprep "is not a function" fix for bundled deployments

saslprep is an optional dependency used to perform Stringprep Profile for User Names and Passwords for SCRAM-SHA-256 authentication. The saslprep library breaks when it is bundled, causing the driver to throw TypeErrors.

This release includes a fix that prevents the driver throwing TypeErrors when attempting to use saslprep in bundled environments.

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
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@baileympearson baileympearson changed the title DI sasl prep and handle non-function value fix(NODE-5289): prevent scram auth from throwing TypeError if saslprep is not a function Jun 15, 2023
@nbbeeken nbbeeken self-assigned this Jun 15, 2023
@nbbeeken nbbeeken self-requested a review June 15, 2023 21:29
src/cmap/auth/scram.ts Outdated Show resolved Hide resolved
test/integration/auth/scram_sha_256.test.ts Outdated Show resolved Hide resolved
test/mongodb.ts Outdated Show resolved Hide resolved
src/cmap/auth/scram.ts Outdated Show resolved Hide resolved
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Jun 15, 2023
test/mongodb.ts Outdated Show resolved Hide resolved
@baileympearson baileympearson marked this pull request as ready for review June 16, 2023 15:32
@nbbeeken nbbeeken added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Jun 16, 2023
Co-authored-by: Neal Beeken <neal.beeken@mongodb.com>
@nbbeeken nbbeeken merged commit e006347 into main Jun 16, 2023
26 checks passed
@nbbeeken nbbeeken deleted the NODE-5289-handle-null-saslprep branch June 16, 2023 21:07
baileympearson added a commit that referenced this pull request Jun 16, 2023
baileympearson added a commit that referenced this pull request Jun 16, 2023
malikj2000 pushed a commit that referenced this pull request Jun 29, 2023
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
2 participants