@xuda.io/xuda-worker-bundle-min 1.3.1515 → 1.3.1516
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/index.js +10 -10
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -8401,7 +8401,7 @@ func.expression.parse = function (input) {
|
|
|
8401
8401
|
return segments;
|
|
8402
8402
|
};
|
|
8403
8403
|
|
|
8404
|
-
func.expression.
|
|
8404
|
+
func.expression.get_property = async function (valP) {
|
|
8405
8405
|
async function secure_eval(val) {
|
|
8406
8406
|
if (typeof IS_PROCESS_SERVER === 'undefined') {
|
|
8407
8407
|
try {
|
|
@@ -8440,7 +8440,7 @@ func.expression.get_property_org = async function (valP) {
|
|
|
8440
8440
|
};
|
|
8441
8441
|
};
|
|
8442
8442
|
|
|
8443
|
-
func.expression.
|
|
8443
|
+
func.expression.get_property_bad = async function (valP) {
|
|
8444
8444
|
if (typeof valP !== 'string') return { property1: undefined, property2: undefined };
|
|
8445
8445
|
|
|
8446
8446
|
const secureEval = async (expr) => {
|
|
@@ -8485,27 +8485,27 @@ func.expression.get_property = async function (valP) {
|
|
|
8485
8485
|
return { property1, property2 };
|
|
8486
8486
|
};
|
|
8487
8487
|
|
|
8488
|
-
func.expression.
|
|
8488
|
+
func.expression.validate_constant = function (valP) {
|
|
8489
8489
|
var patt = /["']/;
|
|
8490
8490
|
if (typeof valP === 'string' && patt.test(valP.substr(0, 1)) && patt.test(valP.substr(0, valP.length - 1))) return true;
|
|
8491
8491
|
else return false;
|
|
8492
8492
|
};
|
|
8493
|
-
func.expression.
|
|
8493
|
+
func.expression.validate_variables = function (valP) {
|
|
8494
8494
|
if (typeof valP === 'string' && valP.indexOf('@') > -1) return true;
|
|
8495
8495
|
else return false;
|
|
8496
8496
|
};
|
|
8497
|
-
func.expression.
|
|
8497
|
+
func.expression.remove_quotes = function (valP) {
|
|
8498
8498
|
if (func.expression.validate_constant(valP)) return valP.substr(1, valP.length - 2);
|
|
8499
8499
|
else return valP;
|
|
8500
8500
|
};
|
|
8501
8501
|
|
|
8502
|
-
func.expression.
|
|
8502
|
+
func.expression.validate_constant_bad = (valP) => typeof valP === 'string' && /^["'].*["']$/.test(valP);
|
|
8503
8503
|
|
|
8504
|
-
func.expression.
|
|
8504
|
+
func.expression.validate_variables_bad = (valP) => typeof valP === 'string' && valP.includes('@');
|
|
8505
8505
|
|
|
8506
|
-
func.expression.
|
|
8506
|
+
func.expression.remove_quotes_bad = (valP) => (func.expression.validate_constant(valP) && typeof valP === 'string' ? valP.slice(1, -1) : valP);
|
|
8507
8507
|
|
|
8508
|
-
func.expression.
|
|
8508
|
+
func.expression.secure_eval = async function (SESSION_ID, sourceP, val, job_id, dsSessionP, js_script_callback, evt) {
|
|
8509
8509
|
const api_utils = await func.common.get_module(SESSION_ID, 'xuda-api-library.mjs', {
|
|
8510
8510
|
func,
|
|
8511
8511
|
glb,
|
|
@@ -8607,7 +8607,7 @@ func.expression.secure_eval_org = async function (SESSION_ID, sourceP, val, job_
|
|
|
8607
8607
|
}
|
|
8608
8608
|
};
|
|
8609
8609
|
|
|
8610
|
-
func.expression.
|
|
8610
|
+
func.expression.secure_eval_bad = async function (SESSION_ID, sourceP, val, job_id, dsSessionP, js_script_callback, evt) {
|
|
8611
8611
|
if (typeof val !== 'string') return val;
|
|
8612
8612
|
|
|
8613
8613
|
const xu = await func.common.get_module(SESSION_ID, 'xuda-api-library.mjs', {
|