mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
sanitizeQuery fix, minor chat crash fix
This commit is contained in:
parent
0a40e1024b
commit
6335069b60
3 changed files with 9 additions and 3 deletions
|
@ -22,8 +22,11 @@ import utils from '../utils/utils'
|
|||
|
||||
const debugLog = process.env.NS_SQL_DEBUG_LOG
|
||||
|
||||
function sanitizeQuery(val: string): string {
|
||||
return val.replace(/'/g, '').replace(/;/g, '')
|
||||
function sanitizeQuery(val) {
|
||||
if (typeof val === 'string') {
|
||||
return val.replace(/'/g, '').replace(/;/g, '')
|
||||
}
|
||||
return val
|
||||
}
|
||||
|
||||
// { asd: 'asd', basd: 4 } => asd = 'asd', basd = 4
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue