Skip to content
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

[PoC]: SQL Native FOR JSON implemenation #766

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

BobdenOs
Copy link
Contributor

@BobdenOs BobdenOs commented Aug 1, 2024

Just in case

@@ -1239,6 +1247,10 @@
// Look for deployment batch dispatch and execute as single query
// When deployment is not executed in a batch it will fail to create views
if (Array.isArray(req.query) && !req.query.find(q => typeof q !== 'string' || this.hasResults(q))) {
const caches = req.query
.filter(q => /(^|')CREATE VIEW (.*) AS/.test(q) && !/[ "]localized[._]/i.test(q))

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings starting with 'CREATE VIEW ' and with many repetitions of ''CREATE VIEW a'.
@@ -1239,6 +1247,10 @@
// Look for deployment batch dispatch and execute as single query
// When deployment is not executed in a batch it will fail to create views
if (Array.isArray(req.query) && !req.query.find(q => typeof q !== 'string' || this.hasResults(q))) {
const caches = req.query
.filter(q => /(^|')CREATE VIEW (.*) AS/.test(q) && !/[ "]localized[._]/i.test(q))
.map(q => `ALTER VIEW ${/(^|')CREATE VIEW (.*) AS/.exec(q)[2]} ADD CACHE RETENTION 60`)

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings starting with 'CREATE VIEW ' and with many repetitions of ''CREATE VIEW a'.
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 this pull request may close these issues.

1 participant