Skip to content

graph.query wont escape params #51

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

Closed
avifatal opened this issue May 26, 2020 · 8 comments · Fixed by #56
Closed

graph.query wont escape params #51

avifatal opened this issue May 26, 2020 · 8 comments · Fixed by #56

Comments

@avifatal
Copy link

avifatal commented May 26, 2020

Hi,
From my experience, query bindings capabilities escape the data before it is being saved to the database. for security reasons and data integrity reasons...

await graph.query("CREATE (n:Person { name: $name })", {name: 'test"abc'});

This will throw an error:

ReplyError: errMsg: Invalid input 'a': expected ';', a statement option, a query hint, a clause or a schema command line: 1, column: 1, offset: 0 errCtx: abc"  CREATE (n:Person { name: $name }) errCtxOffset: 0
    at parseError (/usr/src/app/node_modules/redis-parser/lib/parser.js:179:12)

I think it must be escaped by the framework...

Thanks

@DvirDukhan
Copy link
Contributor

@avifatal
please verify so I can close this issue

@avifatal
Copy link
Author

avifatal commented Jun 2, 2020

@DvirDukhan Thanks for the fast reply. I was a little bit off. will have a soon. thanks

@avifatal
Copy link
Author

avifatal commented Jul 5, 2020

Verified

@avifatal
Copy link
Author

@DvirDukhan Hi,
When are you going to release it here https://www.npmjs.com/package/redisgraph.js ?
Thanks

@DvirDukhan
Copy link
Contributor

@avifatal
this week

@DvirDukhan
Copy link
Contributor

@avifatal published

@avifatal
Copy link
Author

Toda!

@DvirDukhan
Copy link
Contributor

Bevakasha
I think you should wait for 2.2.1
#56
I missed an edge case

@gkorland gkorland linked a pull request Jul 26, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants