Skip to content

Ensure values from parser are escaped #9

Open
@Raynos

Description

@Raynos

We have an example like

const expression = 'SET $(elevation) = 46.6'
const { err, data } = await table.update('oregon', 'salem', expression)

Our users are going to do something like

const expression = 'SET $(elevation) = ' + newValue
const { err, data } = await table.update('oregon', 'salem', expression)

^ This is a DynamoDB injection waiting to happen.

We should have something like

const expression = table.expr`SET $(elevation) = ${newValue}`
const { err, data } = await table.update('oregon', 'salem', expression)

With a function that does escaping for whatever

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions