alasql 4.14.1 → 4.14.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.14.
|
|
1
|
+
//! AlaSQL v4.14.2 build: develop-4992fcb1 | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.14.
|
|
4
|
+
@version 4.14.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.14.
|
|
1
|
+
//! AlaSQL v4.14.2 build: develop-4992fcb1 | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.14.
|
|
4
|
+
@version 4.14.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.14.
|
|
144
|
+
alasql.version = '4.14.2';
|
|
145
145
|
alasql.build = 'develop-4992fcb1';
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -2666,7 +2666,7 @@ next:function () {
|
|
|
2666
2666
|
|
|
2667
2667
|
// return next match that has a token
|
|
2668
2668
|
lex:function lex () {
|
|
2669
|
-
var r = this.next();
|
|
2669
|
+
var r = this.next();if(r&&/^(N?['"]__proto__['"]|\[__proto__\]|`__proto__`|__proto__)$/i.test(this.yytext))throw new Error("__proto__ is not allowed");
|
|
2670
2670
|
if (r) {
|
|
2671
2671
|
return r;
|
|
2672
2672
|
} else {
|
|
@@ -6833,7 +6833,7 @@ function queryfn3(query) {
|
|
|
6833
6833
|
|
|
6834
6834
|
// Prepare variables
|
|
6835
6835
|
query.data = [];
|
|
6836
|
-
query.xgroups
|
|
6836
|
+
query.xgroups=Object.create(null);
|
|
6837
6837
|
query.groups = [];
|
|
6838
6838
|
|
|
6839
6839
|
// Level of Joins
|
|
@@ -16239,22 +16239,22 @@ yy.SetVariable.prototype.execute = function (databaseid, params, cb) {
|
|
|
16239
16239
|
if (this.props && this.props.length > 0) {
|
|
16240
16240
|
let fs;
|
|
16241
16241
|
if (this.method === '@') {
|
|
16242
|
-
fs = `alasql.vars['${this.variable}']`;
|
|
16242
|
+
fs = `alasql.vars[k('${this.variable}')]`;
|
|
16243
16243
|
} else {
|
|
16244
|
-
fs = `params['${this.variable}']`;
|
|
16244
|
+
fs = `params[k('${this.variable}')]`;
|
|
16245
16245
|
}
|
|
16246
16246
|
this.props.forEach(prop => {
|
|
16247
16247
|
if (typeof prop === 'string') {
|
|
16248
|
-
fs += `['${prop}']`;
|
|
16248
|
+
fs += `[k('${prop}')]`;
|
|
16249
16249
|
} else if (typeof prop === 'number') {
|
|
16250
16250
|
fs += `[${prop}]`;
|
|
16251
16251
|
} else {
|
|
16252
16252
|
// Assuming prop.toJS() is a method that converts prop to a JavaScript expression.
|
|
16253
|
-
fs += `[${prop.toJS()}]`;
|
|
16253
|
+
fs += `[k(${prop.toJS()})]`;
|
|
16254
16254
|
}
|
|
16255
16255
|
});
|
|
16256
16256
|
|
|
16257
|
-
new Function('value, params, alasql',
|
|
16257
|
+
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);
|
|
16258
16258
|
} else {
|
|
16259
16259
|
if (this.method === '@') {
|
|
16260
16260
|
alasql.vars[this.variable] = res;
|
package/dist/alasql.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.14.
|
|
1
|
+
//! AlaSQL v4.14.2 build: develop-4992fcb1 | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.14.
|
|
4
|
+
@version 4.14.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.14.
|
|
144
|
+
alasql.version = '4.14.2';
|
|
145
145
|
alasql.build = 'develop-4992fcb1';
|
|
146
146
|
|
|
147
147
|
/**
|
|
@@ -2666,7 +2666,7 @@ next:function () {
|
|
|
2666
2666
|
|
|
2667
2667
|
// return next match that has a token
|
|
2668
2668
|
lex:function lex () {
|
|
2669
|
-
var r = this.next();
|
|
2669
|
+
var r = this.next();if(r&&/^(N?['"]__proto__['"]|\[__proto__\]|`__proto__`|__proto__)$/i.test(this.yytext))throw new Error("__proto__ is not allowed");
|
|
2670
2670
|
if (r) {
|
|
2671
2671
|
return r;
|
|
2672
2672
|
} else {
|
|
@@ -6833,7 +6833,7 @@ function queryfn3(query) {
|
|
|
6833
6833
|
|
|
6834
6834
|
// Prepare variables
|
|
6835
6835
|
query.data = [];
|
|
6836
|
-
query.xgroups
|
|
6836
|
+
query.xgroups=Object.create(null);
|
|
6837
6837
|
query.groups = [];
|
|
6838
6838
|
|
|
6839
6839
|
// Level of Joins
|
|
@@ -16239,22 +16239,22 @@ yy.SetVariable.prototype.execute = function (databaseid, params, cb) {
|
|
|
16239
16239
|
if (this.props && this.props.length > 0) {
|
|
16240
16240
|
let fs;
|
|
16241
16241
|
if (this.method === '@') {
|
|
16242
|
-
fs = `alasql.vars['${this.variable}']`;
|
|
16242
|
+
fs = `alasql.vars[k('${this.variable}')]`;
|
|
16243
16243
|
} else {
|
|
16244
|
-
fs = `params['${this.variable}']`;
|
|
16244
|
+
fs = `params[k('${this.variable}')]`;
|
|
16245
16245
|
}
|
|
16246
16246
|
this.props.forEach(prop => {
|
|
16247
16247
|
if (typeof prop === 'string') {
|
|
16248
|
-
fs += `['${prop}']`;
|
|
16248
|
+
fs += `[k('${prop}')]`;
|
|
16249
16249
|
} else if (typeof prop === 'number') {
|
|
16250
16250
|
fs += `[${prop}]`;
|
|
16251
16251
|
} else {
|
|
16252
16252
|
// Assuming prop.toJS() is a method that converts prop to a JavaScript expression.
|
|
16253
|
-
fs += `[${prop.toJS()}]`;
|
|
16253
|
+
fs += `[k(${prop.toJS()})]`;
|
|
16254
16254
|
}
|
|
16255
16255
|
});
|
|
16256
16256
|
|
|
16257
|
-
new Function('value, params, alasql',
|
|
16257
|
+
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);
|
|
16258
16258
|
} else {
|
|
16259
16259
|
if (this.method === '@') {
|
|
16260
16260
|
alasql.vars[this.variable] = res;
|