+9
-2
@@ -59,6 +59,13 @@ var router = require('router'); | ||
| var invoke = function(request, data, jsonp, response) { | ||
| var respond = responder(response, jsonp); | ||
| if (json) { | ||
| data = (data && JSON.parse(data)) || {}; | ||
| try { | ||
| data = (data && JSON.parse(data)) || {}; | ||
| } catch(err) { | ||
| respond(400, {error:'request MUST be valid JSON: '+err.message}); | ||
| return; | ||
| } | ||
| } | ||
| callback(request, data, responder(response, jsonp)); | ||
| callback(request, data, respond); | ||
| }; | ||
@@ -65,0 +72,0 @@ var onbodyrequest = function(request, response) { |
+1
-1
@@ -5,3 +5,3 @@ { | ||
| "keywords": ["cross-domain", "cors", "crud", "browser", "cross-browser"], | ||
| "version":"0.2.2", | ||
| "version":"0.2.3", | ||
| "homepage" : "https://github.com/gett/crossmania", | ||
@@ -8,0 +8,0 @@ "author": "Ge.tt <hello@ge.tt>", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
10285
1.56%129
4.88%2
-33.33%