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

remove mongodb auth from logs #50

Closed
wants to merge 2 commits into from
Closed

remove mongodb auth from logs #50

wants to merge 2 commits into from

Conversation

Apollinaire
Copy link

Putting mongodb secrets in logs is a bad idea, so I just wrote a small function to remove the username and the password from the logs.
I tried to keep consistent with the general coding style and added a test for the util function that I created. Don't hesitate to tell if you want anything changed!

@coveralls
Copy link

coveralls commented Sep 23, 2019

Pull Request Test Coverage Report for Build 170

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+1.0%) to 57.26%

Totals Coverage Status
Change from base Build 168: 1.0%
Covered Lines: 1028
Relevant Lines: 1592

💛 - Coveralls

@electerious
Copy link
Owner

Totally missed that the mongodb URI can contains username and password. Thanks for the PR. I will take a look at it later this week!

@electerious
Copy link
Owner

Implemented 👍 I've switched to normalizeUrl because it's already in use, widely tested and has a stripAuthentication option.

@Apollinaire Apollinaire deleted the develop branch September 30, 2019 07:46
@electerious electerious mentioned this pull request Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants