Skip to content

Bad string generating by Expression #486

Closed
@zeruk

Description

@zeruk

Expected Behavior

Trying to escape some random input to break expression

exp = new Influx.Expression();
exp.tag('symbol').equals.value(`GAZP()\'`).toString() // **`"symbol" = 'GAZP()\\\''`**

And it should escape characters correctly

Actual Behavior

But it doesn't escape them

exp = new Influx.Expression();
exp.tag('symbol').equals.value(`GAZP()\'`).toString() // **`"symbol" = 'GAZP()\\''`**

Steps/Code to Reproduce the Problem

const influx = require('influx')
const exp = new influx.Expression();
exp.tag('symbol').equals.value(`GAZP()\'`).toString()
// ...

Specifications

  • Version: 5.5.1
  • Platform: Darwin

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions