mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 03:16:01 +00:00
mongodb: encode username and password #560
This commit is contained in:
@@ -60,7 +60,7 @@ const driver = {
|
||||
mongoUrl = databaseUrl;
|
||||
}
|
||||
} else {
|
||||
mongoUrl = user ? `mongodb://${user}:${password}@${server}:${port}` : `mongodb://${server}:${port}`;
|
||||
mongoUrl = user ? `mongodb://${encodeURIComponent(user)}:${encodeURIComponent(password)}@${server}:${port}` : `mongodb://${server}:${port}`;
|
||||
}
|
||||
|
||||
const options = {
|
||||
|
||||
Reference in New Issue
Block a user