-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Valid password characters can break the connection string #229
Comments
encodeURIComponent should help here. |
I guess I should move this to https://github.com/feathersjs/generator-feathers, too. |
I received this same error messa when I edited my src/models/users.model.js and described one of my fields as
It seems the fact I declared the size of the field wasn't well accepted by sequelize and the error message was
When I removed the (256) it worked fine again. Curiously it accepts a size specification for all other data types. I'am using MariaDB, which I am not very familiar with, and don't know if this is characteristic to this data type or just a bug. I'll investigate further another time. Have to deliver a lot this week and this is not stimulating to research activities. I hope this helps to bring some light to this issue. |
Steps to reproduce
In
./config/default.json
, setpostgres
to a connection string likepostgres://database_user:abc1d-e?=F$GhI2j@localhost:5432/target_database
and try to start the app.Expected behavior
Successful DB connection.
Actual behavior
It seems that the connection string parsing in sequelize is brittle.
error: Unhandled Rejection at: Promise {"_bitField":18087936,"_fulfillmentHandler0":{"name":"SequelizeHostNotFoundError","parent":{"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo","hostname":"database_user","host":"database_user","port":5432},"original":{"code":"ENOTFOUND","errno":"ENOTFOUND","syscall":"getaddrinfo","hostname":"database_user","host":"database_user","port":5432}}}
System configuration
Module version: [email protected]
NodeJS version: v8.11.3
Operating System: macOS 10.13.6
I propose that we also accept an object like
I guess this is something I could implement in the generators that output
default.json
andsrc/sequelize.js
?The text was updated successfully, but these errors were encountered: