-
Notifications
You must be signed in to change notification settings - Fork 104
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: hide password of mongo url #32
Conversation
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 5 6 +1
Lines 46 60 +14
=====================================
+ Hits 46 60 +14
Continue to review full report at Codecov.
|
@atian25 Snyk blocks this PR, I think url-mask has vulnerable dependency |
yes, it use lodash-merge maybe we do not use this lib, but write it ourself. just using |
/lib/filterURLPassword.js add new .js file /lib/mongoose.js replace the url-mask to filterURLPassword /test/mongoose.test.js add testing
b9b91ce
to
5c08fc7
Compare
3.1.2 |
@dead-horse @fengmk2 我没权限发,给个 npm 权限我下。 $ npm owner add atian25 egg-mongoose |
done @trylovetom |
@trylovetom I had rollback this version due to eggjs/egg#3675 the full mongoose connection string format is : https://docs.mongodb.com/manual/reference/connection-string/ and the url parser is so complex: https://github.com/mongodb-js/mongodb-core/blob/70a7d947bc1f8568c347d882914cc335fe68ab81/lib/uri_parser.js#L487 so maybe we should use the old way - string replace. sorry for your time. |
[skip ci] ## 1.0.0 (2023-08-12) ### ⚠ BREAKING CHANGES * Drop Node.js < 14 and egg < 3 support ### Features * [BREAKING_CHANGE] add unregular model judgement ([#7](#7)) ([ffde348](ffde348)) * bump mongoose version to 5.0 ([#20](#20)) ([a3405d6](a3405d6)) * first implement ([#2](#2)) ([45419ad](45419ad)) * support mongoose global plugin ([#35](#35)) ([1f450fb](1f450fb)) * support multi client ([#15](#15)) ([22d134b](22d134b)) * support plugins for special clients ([#41](#41)) ([67f8f1f](67f8f1f)) * update mongoose's version to be compatable with typescript schemas (Nodejs >=14.x), with Egg>=3.x ([#54](#54)) ([c87f19d](c87f19d)) ### Bug Fixes * doc typo. ([#40](#40)) ([8ef2ebc](8ef2ebc)) * fix __mongoose refer ([#16](#16)) ([b281b15](b281b15)) * hide password of mongo url ([#32](#32)) ([441b6fc](441b6fc)) * remove heartbeat ([#4](#4)) ([343cc78](343cc78)) * replace auth with string replace ([#34](#34)) ([5b9f8ba](5b9f8ba)) * shall re-throw errors on first connect ([#18](#18)) ([dde9037](dde9037)) * **typescript:** types of mongoose should be dependencies ([#24](#24)) ([de7e54e](de7e54e))
Checklist
npm test
passesDescription of change
/package.json
: add url mask (https://github.com/tanzim/url-mask)/lib/mongoose.js
: setup url mask with logger