Skip to content

Commit a027725

Browse files
committed
removed database auth check in initial version
1 parent c84eb3b commit a027725

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/Security/CheckGroups/CheckGroupDatabase.js

-16
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,7 @@ class CheckGroupDatabase extends CheckGroup {
1919
const config = Config.get(Parse.applicationId);
2020
const databaseAdapter = config.database.adapter;
2121
const databaseUrl = databaseAdapter._uri;
22-
const MongoClient = require('mongodb').MongoClient;
2322
return [
24-
new Check({
25-
title: `Database requires authentication`,
26-
warning: 'Database requires no authentication to connect which allows anyone to connect and potentially access data.',
27-
solution: 'Change database access settings.',
28-
check: async () => {
29-
try {
30-
const urlWithoutCredentials = databaseUrl.replace(/\/\/(\S+:\S+)@/, '//');
31-
const client = await MongoClient.connect(urlWithoutCredentials, { useNewUrlParser: true });
32-
await client.db("admin").command({ ping: 1 });
33-
throw 1;
34-
} catch {
35-
return;
36-
}
37-
},
38-
}),
3923
new Check({
4024
title: 'Secure database password',
4125
warning: 'The database password is insecure and vulnerable to brute force attacks.',

0 commit comments

Comments
 (0)