Fix injection
This commit is contained in:
parent
97e1b7eef0
commit
400614a8c9
|
@ -178,7 +178,7 @@ MySQL.prototype.toDatabase = function (prop, val) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!prop) return val;
|
if (!prop) return val;
|
||||||
if (prop.type.name === 'Number') return val;
|
if (prop.type.name === 'Number') return Number(val);
|
||||||
if (prop.type.name === 'Date') {
|
if (prop.type.name === 'Date') {
|
||||||
if (!val) return 'NULL';
|
if (!val) return 'NULL';
|
||||||
if (!val.toUTCString) {
|
if (!val.toUTCString) {
|
||||||
|
|
Loading…
Reference in New Issue