@existdb/node-exist
Advanced tools
| function getUserInfo (client, userName) { | ||
| return client.promisedMethodCall('getUser', [userName]) | ||
| return client.promisedMethodCall('getAccount', [userName]) | ||
| } | ||
@@ -4,0 +4,0 @@ |
+1
-1
@@ -58,3 +58,3 @@ { | ||
| }, | ||
| "version": "4.3.1" | ||
| "version": "4.3.2" | ||
| } |
+30
-4
@@ -18,13 +18,39 @@ const test = require('tape') | ||
| test.skip('get user info', function (t) { | ||
| test('get user info for admin', function (t) { | ||
| const db = connect(connectionOptions) | ||
| db.users.byName('admin') | ||
| db.users.getUserInfo('admin') | ||
| .then(function (info) { | ||
| console.log(info) | ||
| t.ok(info) | ||
| t.end() | ||
| }) | ||
| .catch(function (e) { | ||
| console.error(e) | ||
| t.fail() | ||
| t.end() | ||
| }) | ||
| }) | ||
| test('get user info for guest', function (t) { | ||
| const db = connect(connectionOptions) | ||
| db.users.getUserInfo('guest') | ||
| .then(function (info) { | ||
| t.ok(info) | ||
| t.end() | ||
| }) | ||
| .catch(function (e) { | ||
| t.fail() | ||
| t.end() | ||
| }) | ||
| }) | ||
| test('get user info for non-existent user', function (t) { | ||
| const db = connect(connectionOptions) | ||
| db.users.getUserInfo('thisuserschouldnotexist') | ||
| .then(function (info) { | ||
| t.fail() | ||
| t.end() | ||
| }) | ||
| .catch(function (e) { | ||
| t.ok(e) | ||
| t.end() | ||
| }) | ||
| }) |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
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 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
68069
0.78%1079
2.27%