-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
Affects Version/s: 1.46.0
-
Component/s: Export to Language
-
None
-
Environment:OS: macos 15.4
node.js / npm versions:
Additional info:
-
Not Needed
-
None
-
Developer Tools
Problem Statement/Rationale
When exporting an aggregation to a languauge, do not include password details in plain text.
Steps to Reproduce
- Create an aggregation in the aggregation builder
- Click Export to languauge
- Ensure "Include Driver Syntax" is checked
- Copy paste the query to a slack channel and ask an admin to run it on a production server.
- Panic as you realize you've just pasted a password in plain text
- Edit the Slack message to remove the password.
Expected Results
The pasted driver syntax should not include a password. Perhaps MONGO_URI or `mongodb+srv://<username>:<password>@hostname.org/dbname`
Actual Results
A password in plain text.
Additional Notes
It would be helpful if we had `mongosh` as a driver language since the existing export left hand side doesn't include `db['collectionName'].aggregate([...])` This would skip the need for the driver syntax for lazy people who don't want to add the needed info for admins to run a command/aggregation on prod.