node-red / node-red/node-red-nodes
Can't have "@" in the password field
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 13h 57m
- Merged PRs (30d)
- 3
Description
It looks like having an "@" in the password field breaks the connection with the database. The error message that I am getting shows:
For a password: 123@ab
Error [ab:27017]
Where ab comes from the password and 27017 is the default port.
My guess is that the fields are being concatenated to form the URL: mongodb//user:password@hostname:port
And when nodejs finds the first "@" it thinks that what comes after that is the hostname.
A workaround for this issue is to use the db.authenticate(...) method.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the MongoDB connection entry point that builds the connection URL; the issue does not name a file or test. Reproduce with password 123@ab, compare the authenticate(...) workaround, and consider it done when that password connects without treating “ab” as the hostname.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100