alasql 4.11.1 → 4.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/alasql-cli.js +1 -1
- package/dist/alasql-worker.js +2 -2
- package/dist/alasql.fs.js +10 -10
- package/dist/alasql.js +10 -10
- package/dist/alasql.min.js +6 -6
- package/package.json +1 -1
package/bin/alasql-cli.js
CHANGED
package/dist/alasql-worker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.11.
|
|
1
|
+
//! AlaSQL v4.11.2 build: develop-bc5dc5de | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.11.
|
|
4
|
+
@version 4.11.2
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2025 Andrey Gershun & Mathias Wulff
|
package/dist/alasql.fs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.11.
|
|
1
|
+
//! AlaSQL v4.11.2 build: develop-bc5dc5de | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.11.
|
|
4
|
+
@version 4.11.2
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2025 Andrey Gershun & Mathias Wulff
|
|
@@ -141,7 +141,7 @@ SOFTWARE.
|
|
|
141
141
|
Current version of alasql
|
|
142
142
|
@constant {string}
|
|
143
143
|
*/
|
|
144
|
-
alasql.version = '4.11.
|
|
144
|
+
alasql.version = '4.11.2';
|
|
145
145
|
alasql.build = 'develop-bc5dc5de';
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -2570,7 +2570,7 @@ next:function () {
|
|
|
2570
2570
|
|
|
2571
2571
|
// return next match that has a token
|
|
2572
2572
|
lex:function lex () {
|
|
2573
|
-
var r = this.next();
|
|
2573
|
+
var r = this.next();if(r&&/^(N?['"]__proto__['"]|\[__proto__\]|`__proto__`|__proto__)$/i.test(this.yytext))throw new Error("__proto__ is not allowed");
|
|
2574
2574
|
if (r) {
|
|
2575
2575
|
return r;
|
|
2576
2576
|
} else {
|
|
@@ -6688,7 +6688,7 @@ function queryfn3(query) {
|
|
|
6688
6688
|
|
|
6689
6689
|
// Prepare variables
|
|
6690
6690
|
query.data = [];
|
|
6691
|
-
query.xgroups
|
|
6691
|
+
query.xgroups=Object.create(null);
|
|
6692
6692
|
query.groups = [];
|
|
6693
6693
|
|
|
6694
6694
|
// Level of Joins
|
|
@@ -15952,22 +15952,22 @@ yy.SetVariable.prototype.execute = function (databaseid, params, cb) {
|
|
|
15952
15952
|
if (this.props && this.props.length > 0) {
|
|
15953
15953
|
let fs;
|
|
15954
15954
|
if (this.method === '@') {
|
|
15955
|
-
fs = `alasql.vars['${this.variable}']`;
|
|
15955
|
+
fs = `alasql.vars[k('${this.variable}')]`;
|
|
15956
15956
|
} else {
|
|
15957
|
-
fs = `params['${this.variable}']`;
|
|
15957
|
+
fs = `params[k('${this.variable}')]`;
|
|
15958
15958
|
}
|
|
15959
15959
|
this.props.forEach(prop => {
|
|
15960
15960
|
if (typeof prop === 'string') {
|
|
15961
|
-
fs += `['${prop}']`;
|
|
15961
|
+
fs += `[k('${prop}')]`;
|
|
15962
15962
|
} else if (typeof prop === 'number') {
|
|
15963
15963
|
fs += `[${prop}]`;
|
|
15964
15964
|
} else {
|
|
15965
15965
|
// Assuming prop.toJS() is a method that converts prop to a JavaScript expression.
|
|
15966
|
-
fs += `[${prop.toJS()}]`;
|
|
15966
|
+
fs += `[k(${prop.toJS()})]`;
|
|
15967
15967
|
}
|
|
15968
15968
|
});
|
|
15969
15969
|
|
|
15970
|
-
new Function('value, params, alasql',
|
|
15970
|
+
new Function('value, params, alasql', `var k=function(x){if(x==="__proto__"||x==="constructor"||x==="prototype")throw new Error(x+" is not allowed");return x};${fs} = value`)(res, params, alasql);
|
|
15971
15971
|
} else {
|
|
15972
15972
|
if (this.method === '@') {
|
|
15973
15973
|
alasql.vars[this.variable] = res;
|
package/dist/alasql.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.11.
|
|
1
|
+
//! AlaSQL v4.11.2 build: develop-bc5dc5de | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.11.
|
|
4
|
+
@version 4.11.2
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2025 Andrey Gershun & Mathias Wulff
|
|
@@ -141,7 +141,7 @@ SOFTWARE.
|
|
|
141
141
|
Current version of alasql
|
|
142
142
|
@constant {string}
|
|
143
143
|
*/
|
|
144
|
-
alasql.version = '4.11.
|
|
144
|
+
alasql.version = '4.11.2';
|
|
145
145
|
alasql.build = 'develop-bc5dc5de';
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -2570,7 +2570,7 @@ next:function () {
|
|
|
2570
2570
|
|
|
2571
2571
|
// return next match that has a token
|
|
2572
2572
|
lex:function lex () {
|
|
2573
|
-
var r = this.next();
|
|
2573
|
+
var r = this.next();if(r&&/^(N?['"]__proto__['"]|\[__proto__\]|`__proto__`|__proto__)$/i.test(this.yytext))throw new Error("__proto__ is not allowed");
|
|
2574
2574
|
if (r) {
|
|
2575
2575
|
return r;
|
|
2576
2576
|
} else {
|
|
@@ -6688,7 +6688,7 @@ function queryfn3(query) {
|
|
|
6688
6688
|
|
|
6689
6689
|
// Prepare variables
|
|
6690
6690
|
query.data = [];
|
|
6691
|
-
query.xgroups
|
|
6691
|
+
query.xgroups=Object.create(null);
|
|
6692
6692
|
query.groups = [];
|
|
6693
6693
|
|
|
6694
6694
|
// Level of Joins
|
|
@@ -15952,22 +15952,22 @@ yy.SetVariable.prototype.execute = function (databaseid, params, cb) {
|
|
|
15952
15952
|
if (this.props && this.props.length > 0) {
|
|
15953
15953
|
let fs;
|
|
15954
15954
|
if (this.method === '@') {
|
|
15955
|
-
fs = `alasql.vars['${this.variable}']`;
|
|
15955
|
+
fs = `alasql.vars[k('${this.variable}')]`;
|
|
15956
15956
|
} else {
|
|
15957
|
-
fs = `params['${this.variable}']`;
|
|
15957
|
+
fs = `params[k('${this.variable}')]`;
|
|
15958
15958
|
}
|
|
15959
15959
|
this.props.forEach(prop => {
|
|
15960
15960
|
if (typeof prop === 'string') {
|
|
15961
|
-
fs += `['${prop}']`;
|
|
15961
|
+
fs += `[k('${prop}')]`;
|
|
15962
15962
|
} else if (typeof prop === 'number') {
|
|
15963
15963
|
fs += `[${prop}]`;
|
|
15964
15964
|
} else {
|
|
15965
15965
|
// Assuming prop.toJS() is a method that converts prop to a JavaScript expression.
|
|
15966
|
-
fs += `[${prop.toJS()}]`;
|
|
15966
|
+
fs += `[k(${prop.toJS()})]`;
|
|
15967
15967
|
}
|
|
15968
15968
|
});
|
|
15969
15969
|
|
|
15970
|
-
new Function('value, params, alasql',
|
|
15970
|
+
new Function('value, params, alasql', `var k=function(x){if(x==="__proto__"||x==="constructor"||x==="prototype")throw new Error(x+" is not allowed");return x};${fs} = value`)(res, params, alasql);
|
|
15971
15971
|
} else {
|
|
15972
15972
|
if (this.method === '@') {
|
|
15973
15973
|
alasql.vars[this.variable] = res;
|