alasql 4.12.1 → 4.12.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.12.
|
|
1
|
+
//! AlaSQL v4.12.2 build: develop-9b30298b | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.12.
|
|
4
|
+
@version 4.12.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.12.
|
|
1
|
+
//! AlaSQL v4.12.2 build: develop-9b30298b | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.12.
|
|
4
|
+
@version 4.12.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.12.
|
|
144
|
+
alasql.version = '4.12.2';
|
|
145
145
|
alasql.build = 'develop-9b30298b';
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -2660,7 +2660,7 @@ next:function () {
|
|
|
2660
2660
|
|
|
2661
2661
|
// return next match that has a token
|
|
2662
2662
|
lex:function lex () {
|
|
2663
|
-
var r = this.next();
|
|
2663
|
+
var r = this.next();if(r&&/^(N?['"]__proto__['"]|\[__proto__\]|`__proto__`|__proto__)$/i.test(this.yytext))throw new Error("__proto__ is not allowed");
|
|
2664
2664
|
if (r) {
|
|
2665
2665
|
return r;
|
|
2666
2666
|
} else {
|
|
@@ -6786,7 +6786,7 @@ function queryfn3(query) {
|
|
|
6786
6786
|
|
|
6787
6787
|
// Prepare variables
|
|
6788
6788
|
query.data = [];
|
|
6789
|
-
query.xgroups
|
|
6789
|
+
query.xgroups=Object.create(null);
|
|
6790
6790
|
query.groups = [];
|
|
6791
6791
|
|
|
6792
6792
|
// Level of Joins
|
|
@@ -16175,22 +16175,22 @@ yy.SetVariable.prototype.execute = function (databaseid, params, cb) {
|
|
|
16175
16175
|
if (this.props && this.props.length > 0) {
|
|
16176
16176
|
let fs;
|
|
16177
16177
|
if (this.method === '@') {
|
|
16178
|
-
fs = `alasql.vars['${this.variable}']`;
|
|
16178
|
+
fs = `alasql.vars[k('${this.variable}')]`;
|
|
16179
16179
|
} else {
|
|
16180
|
-
fs = `params['${this.variable}']`;
|
|
16180
|
+
fs = `params[k('${this.variable}')]`;
|
|
16181
16181
|
}
|
|
16182
16182
|
this.props.forEach(prop => {
|
|
16183
16183
|
if (typeof prop === 'string') {
|
|
16184
|
-
fs += `['${prop}']`;
|
|
16184
|
+
fs += `[k('${prop}')]`;
|
|
16185
16185
|
} else if (typeof prop === 'number') {
|
|
16186
16186
|
fs += `[${prop}]`;
|
|
16187
16187
|
} else {
|
|
16188
16188
|
// Assuming prop.toJS() is a method that converts prop to a JavaScript expression.
|
|
16189
|
-
fs += `[${prop.toJS()}]`;
|
|
16189
|
+
fs += `[k(${prop.toJS()})]`;
|
|
16190
16190
|
}
|
|
16191
16191
|
});
|
|
16192
16192
|
|
|
16193
|
-
new Function('value, params, alasql',
|
|
16193
|
+
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);
|
|
16194
16194
|
} else {
|
|
16195
16195
|
if (this.method === '@') {
|
|
16196
16196
|
alasql.vars[this.variable] = res;
|
package/dist/alasql.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.12.
|
|
1
|
+
//! AlaSQL v4.12.2 build: develop-9b30298b | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.12.
|
|
4
|
+
@version 4.12.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.12.
|
|
144
|
+
alasql.version = '4.12.2';
|
|
145
145
|
alasql.build = 'develop-9b30298b';
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -2660,7 +2660,7 @@ next:function () {
|
|
|
2660
2660
|
|
|
2661
2661
|
// return next match that has a token
|
|
2662
2662
|
lex:function lex () {
|
|
2663
|
-
var r = this.next();
|
|
2663
|
+
var r = this.next();if(r&&/^(N?['"]__proto__['"]|\[__proto__\]|`__proto__`|__proto__)$/i.test(this.yytext))throw new Error("__proto__ is not allowed");
|
|
2664
2664
|
if (r) {
|
|
2665
2665
|
return r;
|
|
2666
2666
|
} else {
|
|
@@ -6786,7 +6786,7 @@ function queryfn3(query) {
|
|
|
6786
6786
|
|
|
6787
6787
|
// Prepare variables
|
|
6788
6788
|
query.data = [];
|
|
6789
|
-
query.xgroups
|
|
6789
|
+
query.xgroups=Object.create(null);
|
|
6790
6790
|
query.groups = [];
|
|
6791
6791
|
|
|
6792
6792
|
// Level of Joins
|
|
@@ -16175,22 +16175,22 @@ yy.SetVariable.prototype.execute = function (databaseid, params, cb) {
|
|
|
16175
16175
|
if (this.props && this.props.length > 0) {
|
|
16176
16176
|
let fs;
|
|
16177
16177
|
if (this.method === '@') {
|
|
16178
|
-
fs = `alasql.vars['${this.variable}']`;
|
|
16178
|
+
fs = `alasql.vars[k('${this.variable}')]`;
|
|
16179
16179
|
} else {
|
|
16180
|
-
fs = `params['${this.variable}']`;
|
|
16180
|
+
fs = `params[k('${this.variable}')]`;
|
|
16181
16181
|
}
|
|
16182
16182
|
this.props.forEach(prop => {
|
|
16183
16183
|
if (typeof prop === 'string') {
|
|
16184
|
-
fs += `['${prop}']`;
|
|
16184
|
+
fs += `[k('${prop}')]`;
|
|
16185
16185
|
} else if (typeof prop === 'number') {
|
|
16186
16186
|
fs += `[${prop}]`;
|
|
16187
16187
|
} else {
|
|
16188
16188
|
// Assuming prop.toJS() is a method that converts prop to a JavaScript expression.
|
|
16189
|
-
fs += `[${prop.toJS()}]`;
|
|
16189
|
+
fs += `[k(${prop.toJS()})]`;
|
|
16190
16190
|
}
|
|
16191
16191
|
});
|
|
16192
16192
|
|
|
16193
|
-
new Function('value, params, alasql',
|
|
16193
|
+
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);
|
|
16194
16194
|
} else {
|
|
16195
16195
|
if (this.method === '@') {
|
|
16196
16196
|
alasql.vars[this.variable] = res;
|