Skip to content

Commit

Permalink
setup Mongo authSource by ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
sinacek authored and vrana committed Aug 22, 2019
1 parent b079082 commit 34a0bfd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions adminer/drivers/mongo.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,9 @@ function connect() {
if ($db != "") {
$options["db"] = $db;
}
if (($auth_source = getenv("MONGO_AUTH_SOURCE"))) {
$options["authSource"] = $auth_source;
}
try {
$connection->_link = $connection->connect("mongodb://$server", $options);
if ($password != "") {
Expand Down
1 change: 1 addition & 0 deletions changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ SQLite: Handle error in altering table (bug #697)
SQLite: Allow setting auto increment for empty tables
SQLite: Preserve auto increment when recreating table
MS SQL: Support foreign keys to other DB
MongoDB: Allow setting authSource from environment variable

Adminer 4.7.2 (released 2019-07-18):
Do not attempt logging in without password (bug #676)
Expand Down

0 comments on commit 34a0bfd

Please sign in to comment.