Closed
Description
Describe the bug
I am getting the error Invalid connection string format
when trying to connect to the mysql db.
How To Reproduce (best to provide workable code or tests!)
Use a password that contains special characters or even just "-" in the connection string.
E.g. mysql://user:pass-1@localhost:3306/dbname
The source of the error seems to be in the parseConnectionString
function located in the pool.js
file. I guess the regex
const uriRegex = /^(\w+):\/\/(\w+)(?::(\w+))?@([\w.]+)(?::(\d+))?\/(\w+)$/;
is kept too simple. It should allow special characters especially for passwords.