Protect against cypher injection vulnerability

- following @roschaefer PR review suggestion
This commit is contained in:
mattwr18 2019-10-30 15:37:50 +01:00
parent 7564908456
commit 715261238a

View File

@ -40,8 +40,8 @@ export default {
default:
orderByClause = ''
}
const offset = args.offset ? `SKIP ${args.offset}` : ''
const limit = args.first ? `LIMIT ${args.first}` : ''
const offset = args.offset && typeof args.offset === 'number' ? `SKIP ${args.offset}` : ''
const limit = args.first && typeof args.first === 'number' ? `LIMIT ${args.first}` : ''
try {
const cypher = `
MATCH (resource {deleted: false, disabled: false})-[notification:NOTIFIED]->(user:User {id:$id})