Bad string generating by Expression
See original GitHub issueExpected 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
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
JSON Bad String Error - Stack Overflow
I am getting a bad string error. I have tried adding another backslash before the slashes but that changes the equations drastically.
Read more >EGRET: Evil Generation of Regular Expression Tests
EGRET (Evil Generation of Regular Expression Tests) generates a set of accepted and rejected strings for a regular expression.
Read more >Generating Evil Test Strings for Regular Expressions
This paper describes EGRET, a tool for generating evil test strings for regular expressions. EGRET focuses on common mistakes made by developers when...
Read more >SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >Generating Evil Test Strings for Regular Expressions
Changes are only applied to one string that contains that element. Create Evil Strings. 8. Parser. Convert to NFA. Traverse. NFA.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not yet. Though I plan to use Influx again (for the first time in ages) for some home automation stuff, so I will probably be spending some time on this library again
🎉 This issue has been resolved in version 5.5.3 🎉
The release is available on:
Your semantic-release bot 📦🚀