You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_redact_uri() in foca/database/register_mongodb.py splits the connection string with urlsplit(), for which # starts a fragment. PyMongo doesn't treat # as special. With a password containing # in MONGO_URI (e.g. mongodb://user:pa#ss@host/db), the client works, and the INFO log message "Created MongoDB client for ..." has the username and the start of the password.
Proposal
Cut the connection string as PyMongo does: at the first ?, then everything after the last @.
Acceptance criteria
Regression test with # in the password; hosts and path stay in the redacted form.
Activity