http-browserify
Advanced tools
+5
-1
@@ -18,3 +18,7 @@ var Stream = require('stream'); | ||
| try { xhr.withCredentials = true } | ||
| if (typeof params.withCredentials === 'undefined') { | ||
| params.withCredentials = true; | ||
| } | ||
| try { xhr.withCredentials = params.withCredentials } | ||
| catch (e) {} | ||
@@ -21,0 +25,0 @@ |
+1
-1
| { | ||
| "name": "http-browserify", | ||
| "version": "1.3.0", | ||
| "version": "1.3.1", | ||
| "description": "http module compatability for browserify", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+16
-1
@@ -59,2 +59,17 @@ global.window = { | ||
| }) | ||
| }); | ||
| test('Test withCredentials param', function(t) { | ||
| var url = '/api/foo'; | ||
| var request = http.request({ url: url, withCredentials: false }, noop); | ||
| t.equal( request.xhr.withCredentials, false, 'xhr.withCredentials should be false'); | ||
| var request = http.request({ url: url, withCredentials: true }, noop); | ||
| t.equal( request.xhr.withCredentials, true, 'xhr.withCredentials should be true'); | ||
| var request = http.request({ url: url }, noop); | ||
| t.equal( request.xhr.withCredentials, true, 'xhr.withCredentials should be true'); | ||
| t.end(); | ||
| }); |
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
791261
0.08%11703
0.12%