-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
add uri encoding for mongodb connector password🐛 #31371
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Before Merging a Connector Pull RequestWow! What a great pull request you have here! 🎉 To merge this PR, ensure the following has been done/considered for each connector added or updated:
If the checklist is complete, but the CI check is failing,
|
Hello @aglucky thanks for the contribution. I added to the source team backlog to review it. At the moment there are quite a lot of development been made for the Mongo destination and source connector and maybe your change will be contemplated for this refactor. |
airbyte-integrations/connectors/source-mongodb-v2/metadata.yaml
Outdated
Show resolved
Hide resolved
@@ -40,7 +42,7 @@ public static MongoClient createMongoClient(final MongoDbSourceConfig config) { | |||
if (config.hasAuthCredentials()) { | |||
final String authSource = config.getAuthSource(); | |||
final String user = config.getUsername(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does user need encoding as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears so. I didn't realize usernames were allowed to have special characters in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like any of the class that generate the client connection string take care of encoding.
great stuff!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just addressed the feedback!
@aglucky If you don't mind, please update I have no permission to update myself (I can merge to master though) |
@rodireich Just pushed the update to dockerImageTag |
What
Fixes #10569
MongoDB passwords need to be encoded with URI encoding to be valid. This is shown in the below image.
How
I encoded an encoding step when creating the config instance variable for the connector using the Ruby URI module.
Testing
There were no existing integration tests and I am unsure how to add them in this situation.