alasql 4.10.2 → 4.10.3
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.10.
|
|
1
|
+
//! AlaSQL v4.10.3 build: develop-4b9a20d8 | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.10.
|
|
4
|
+
@version 4.10.3
|
|
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.10.
|
|
1
|
+
//! AlaSQL v4.10.3 build: develop-4b9a20d8 | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.10.
|
|
4
|
+
@version 4.10.3
|
|
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.10.
|
|
144
|
+
alasql.version = '4.10.3';
|
|
145
145
|
alasql.build = 'develop-4b9a20d8';
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -2540,7 +2540,7 @@ next:function () {
|
|
|
2540
2540
|
|
|
2541
2541
|
// return next match that has a token
|
|
2542
2542
|
lex:function lex () {
|
|
2543
|
-
var r = this.next();
|
|
2543
|
+
var r = this.next();if(r&&/^(N?['"]__proto__['"]|\[__proto__\]|`__proto__`|__proto__)$/i.test(this.yytext))throw new Error("__proto__ is not allowed");
|
|
2544
2544
|
if (r) {
|
|
2545
2545
|
return r;
|
|
2546
2546
|
} else {
|
|
@@ -6610,7 +6610,7 @@ function queryfn3(query) {
|
|
|
6610
6610
|
|
|
6611
6611
|
// Prepare variables
|
|
6612
6612
|
query.data = [];
|
|
6613
|
-
query.xgroups
|
|
6613
|
+
query.xgroups=Object.create(null);
|
|
6614
6614
|
query.groups = [];
|
|
6615
6615
|
|
|
6616
6616
|
// Level of Joins
|
|
@@ -15127,22 +15127,22 @@ yy.SetVariable.prototype.execute = function (databaseid, params, cb) {
|
|
|
15127
15127
|
if (this.props && this.props.length > 0) {
|
|
15128
15128
|
let fs;
|
|
15129
15129
|
if (this.method === '@') {
|
|
15130
|
-
fs = `alasql.vars['${this.variable}']`;
|
|
15130
|
+
fs = `alasql.vars[k('${this.variable}')]`;
|
|
15131
15131
|
} else {
|
|
15132
|
-
fs = `params['${this.variable}']`;
|
|
15132
|
+
fs = `params[k('${this.variable}')]`;
|
|
15133
15133
|
}
|
|
15134
15134
|
this.props.forEach(prop => {
|
|
15135
15135
|
if (typeof prop === 'string') {
|
|
15136
|
-
fs += `['${prop}']`;
|
|
15136
|
+
fs += `[k('${prop}')]`;
|
|
15137
15137
|
} else if (typeof prop === 'number') {
|
|
15138
15138
|
fs += `[${prop}]`;
|
|
15139
15139
|
} else {
|
|
15140
15140
|
// Assuming prop.toJS() is a method that converts prop to a JavaScript expression.
|
|
15141
|
-
fs += `[${prop.toJS()}]`;
|
|
15141
|
+
fs += `[k(${prop.toJS()})]`;
|
|
15142
15142
|
}
|
|
15143
15143
|
});
|
|
15144
15144
|
|
|
15145
|
-
new Function('value, params, alasql',
|
|
15145
|
+
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);
|
|
15146
15146
|
} else {
|
|
15147
15147
|
if (this.method === '@') {
|
|
15148
15148
|
alasql.vars[this.variable] = res;
|
package/dist/alasql.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.10.
|
|
1
|
+
//! AlaSQL v4.10.3 build: develop-4b9a20d8 | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.10.
|
|
4
|
+
@version 4.10.3
|
|
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.10.
|
|
144
|
+
alasql.version = '4.10.3';
|
|
145
145
|
alasql.build = 'develop-4b9a20d8';
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -2540,7 +2540,7 @@ next:function () {
|
|
|
2540
2540
|
|
|
2541
2541
|
// return next match that has a token
|
|
2542
2542
|
lex:function lex () {
|
|
2543
|
-
var r = this.next();
|
|
2543
|
+
var r = this.next();if(r&&/^(N?['"]__proto__['"]|\[__proto__\]|`__proto__`|__proto__)$/i.test(this.yytext))throw new Error("__proto__ is not allowed");
|
|
2544
2544
|
if (r) {
|
|
2545
2545
|
return r;
|
|
2546
2546
|
} else {
|
|
@@ -6610,7 +6610,7 @@ function queryfn3(query) {
|
|
|
6610
6610
|
|
|
6611
6611
|
// Prepare variables
|
|
6612
6612
|
query.data = [];
|
|
6613
|
-
query.xgroups
|
|
6613
|
+
query.xgroups=Object.create(null);
|
|
6614
6614
|
query.groups = [];
|
|
6615
6615
|
|
|
6616
6616
|
// Level of Joins
|
|
@@ -15127,22 +15127,22 @@ yy.SetVariable.prototype.execute = function (databaseid, params, cb) {
|
|
|
15127
15127
|
if (this.props && this.props.length > 0) {
|
|
15128
15128
|
let fs;
|
|
15129
15129
|
if (this.method === '@') {
|
|
15130
|
-
fs = `alasql.vars['${this.variable}']`;
|
|
15130
|
+
fs = `alasql.vars[k('${this.variable}')]`;
|
|
15131
15131
|
} else {
|
|
15132
|
-
fs = `params['${this.variable}']`;
|
|
15132
|
+
fs = `params[k('${this.variable}')]`;
|
|
15133
15133
|
}
|
|
15134
15134
|
this.props.forEach(prop => {
|
|
15135
15135
|
if (typeof prop === 'string') {
|
|
15136
|
-
fs += `['${prop}']`;
|
|
15136
|
+
fs += `[k('${prop}')]`;
|
|
15137
15137
|
} else if (typeof prop === 'number') {
|
|
15138
15138
|
fs += `[${prop}]`;
|
|
15139
15139
|
} else {
|
|
15140
15140
|
// Assuming prop.toJS() is a method that converts prop to a JavaScript expression.
|
|
15141
|
-
fs += `[${prop.toJS()}]`;
|
|
15141
|
+
fs += `[k(${prop.toJS()})]`;
|
|
15142
15142
|
}
|
|
15143
15143
|
});
|
|
15144
15144
|
|
|
15145
|
-
new Function('value, params, alasql',
|
|
15145
|
+
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);
|
|
15146
15146
|
} else {
|
|
15147
15147
|
if (this.method === '@') {
|
|
15148
15148
|
alasql.vars[this.variable] = res;
|