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
To parse the connection string, we use "new Url(xxx)" but it looks like it urlencodes the parameters : Hence invalidating them when there are special chars.
imagine the password is xx^xx
the connection string can be :
mysql://root:xx^xx@xx.com/xx?charset=utf8mb4
or
mysql://root:xx%5Exx@xx.com/xx?charset=utf8mb4
both usually work in other libs.
it's worth noting that "new Url()" returns in both cases "password: xx%5Exx"
then ofc the connection cant be established because the password is wrong.
Since we use new Url, we should pass the "password" through decodeURIComponent to get it correctly.
static parseUrl(url) {
To parse the connection string, we use "new Url(xxx)" but it looks like it urlencodes the parameters : Hence invalidating them when there are special chars.
imagine the password is xx^xx
the connection string can be :
mysql://root:xx^xx@xx.com/xx?charset=utf8mb4
or
mysql://root:xx%5Exx@xx.com/xx?charset=utf8mb4
both usually work in other libs.
it's worth noting that "new Url()" returns in both cases "password: xx%5Exx"
then ofc the connection cant be established because the password is wrong.
Since we use new Url, we should pass the "password" through decodeURIComponent to get it correctly.
IMHO valid parser would be :
The text was updated successfully, but these errors were encountered: