elysia
Advanced tools
Comparing version 1.1.0-exp.8 to 1.1.0-exp.9
@@ -49,9 +49,2 @@ "use strict"; | ||
if (code.charCodeAt(0) === 40) { | ||
index = code.indexOf(") => {\n"); | ||
if (index !== -1) | ||
return [ | ||
code.slice(1, index), | ||
code.slice(index + 5), | ||
{ isArrowReturn: false } | ||
]; | ||
index = code.indexOf(") => "); | ||
@@ -62,3 +55,3 @@ if (index !== -1) | ||
code.slice(index + 5), | ||
{ isArrowReturn: true } | ||
{ isArrowReturn: code.charCodeAt(index + 5) !== 123 } | ||
]; | ||
@@ -289,15 +282,23 @@ } | ||
var isContextPassToFunction = (context, body, inference) => { | ||
const captureFunction = new RegExp(`(?:\\w)\\((?:.*)?${context}`, "gs"); | ||
captureFunction.test(body); | ||
const nextChar = body.charCodeAt(captureFunction.lastIndex); | ||
if (nextChar === 41 || nextChar === 44) { | ||
inference.query = true; | ||
inference.headers = true; | ||
inference.body = true; | ||
inference.cookie = true; | ||
inference.set = true; | ||
inference.server = true; | ||
try { | ||
const captureFunction = new RegExp(`(?:\\w)\\((?:.*)?${context}`, "gs"); | ||
captureFunction.test(body); | ||
const nextChar = body.charCodeAt(captureFunction.lastIndex); | ||
if (nextChar === 41 || nextChar === 44) { | ||
inference.query = true; | ||
inference.headers = true; | ||
inference.body = true; | ||
inference.cookie = true; | ||
inference.set = true; | ||
inference.server = true; | ||
return true; | ||
} | ||
return false; | ||
} catch (error) { | ||
console.log("[Sucrose] unexpected isContextPassToFunction error, please report the following to the developer:"); | ||
console.log("---"); | ||
console.log(context); | ||
console.log("---"); | ||
return true; | ||
} | ||
return false; | ||
}; | ||
@@ -304,0 +305,0 @@ var sucrose = (lifeCycle, inference = { |
{ | ||
"name": "elysia", | ||
"description": "Ergonomic Framework for Human", | ||
"version": "1.1.0-exp.8", | ||
"version": "1.1.0-exp.9", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "saltyAom", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
5378095
151715