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
When attempting to use Sequelize CLI to connect to a PostgreSQL database, an issue arises if the database password contains a colon (':') symbol. The CLI does not handle this special character correctly, causing authentication failures.
I'm using the Sequelize db:migration with and without --url and in both scenarios, Sequelize could authenticate to the database with the same password but sequelize-cli can not connect to run migrations and seeds.
In the file config-helper.js at line 174, we've identified that the const urlParts = url.parse(urlString);
statement is responsible for decoding encoded URL symbols, including the colon (':').
Due to the following code at line 186, which is password: urlParts.auth.split(':')[1],
characters in the password field after the colon (':') will be ignored.
The text was updated successfully, but these errors were encountered:
This was fixed before (see #334) but for some reason reverted. I copied the code from the core repo, can you check if that works? We have minimal test coverage and with the upcoming rewrite I'm not sure if I want to invest the time into it now. Only main thing we changed is that I'm not using _.assign anymore
When attempting to use Sequelize CLI to connect to a PostgreSQL database, an issue arises if the database password contains a colon (':') symbol. The CLI does not handle this special character correctly, causing authentication failures.
I'm using the
Sequelize db:migration
with and without--url
and in both scenarios, Sequelize could authenticate to the database with the same password butsequelize-cli
can not connect to run migrations and seeds.In the file
config-helper.js
at line 174, we've identified that theconst urlParts = url.parse(urlString);
statement is responsible for decoding encoded URL symbols, including the colon (':').
Due to the following code at line 186, which is
password: urlParts.auth.split(':')[1],
characters in the password field after the colon (':') will be ignored.
The text was updated successfully, but these errors were encountered: