Update to remove null byte before saving to DB and remove null byte on changes
This commit is contained in:
@@ -20,6 +20,13 @@ if (config.dburl)
|
||||
else
|
||||
sequelize = new Sequelize(dbconfig.database, dbconfig.username, dbconfig.password, dbconfig);
|
||||
|
||||
// [Postgres] Handling NULL bytes
|
||||
// https://github.com/sequelize/sequelize/issues/6485
|
||||
function stripNullByte(value) {
|
||||
return value ? value.replace(/\u0000/g, "") : value;
|
||||
}
|
||||
sequelize.stripNullByte = stripNullByte;
|
||||
|
||||
var db = {};
|
||||
|
||||
fs
|
||||
|
||||
Reference in New Issue
Block a user