-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ensure values from parser are escaped #9
Comments
It would actually be like this which prevents injection. The example you give with concat and template literal would throw a parse error. const expression = `SET $(elevation) = S(${newValue})`
const { err, data } = await table.update('oregon', 'salem', expression) all values must be typed. |
hmm after reading the docs & source code more I think this just needs docs & tests. I don't know if If we did it so that the I don't know if a templat eliteral is necessary for the |
in theory you could do some fancy stuff with template-tags, but I think having explicit types is probably less error prone. you can still use template tags to emplace values. |
|
👍 I think that syntax is good. We just need to add more tests to make sure theres no injection attack on our syntax. |
For example const newValue = '100) AND SET $(rekt) = S(100'
const expression = `SET $(elevation) = S(${newValue})` |
basically |
update
expressions
We have an example like
Our users are going to do something like
^ This is a DynamoDB injection waiting to happen.
We should have something like
With a function that does escaping for whatever
The text was updated successfully, but these errors were encountered: