File tree 1 file changed +0
-16
lines changed
1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -19,23 +19,7 @@ class CheckGroupDatabase extends CheckGroup {
19
19
const config = Config . get ( Parse . applicationId ) ;
20
20
const databaseAdapter = config . database . adapter ;
21
21
const databaseUrl = databaseAdapter . _uri ;
22
- const MongoClient = require ( 'mongodb' ) . MongoClient ;
23
22
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
- } ) ,
39
23
new Check ( {
40
24
title : 'Secure database password' ,
41
25
warning : 'The database password is insecure and vulnerable to brute force attacks.' ,
You can’t perform that action at this time.
0 commit comments