From ced5a48fb6ba399780d0b7b16bda1f52ac95ea32 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 16 Aug 2021 10:27:22 -0400 Subject: [PATCH] PHPC-1538: authSource in URI string no longer requires credentials Bump libmongoc 1.19.0 to pull in changes from CDRIVER-3502. Unfortunately, the restriction is still in place for authSource in the URI options array (pending PHPC-1950). --- src/LIBMONGOC_VERSION_CURRENT | 2 +- src/libmongoc | 2 +- tests/manager/manager-ctor-auth_mechanism-error-001.phpt | 7 +------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/LIBMONGOC_VERSION_CURRENT b/src/LIBMONGOC_VERSION_CURRENT index 0c120c28f..815d5ca06 100644 --- a/src/LIBMONGOC_VERSION_CURRENT +++ b/src/LIBMONGOC_VERSION_CURRENT @@ -1 +1 @@ -1.11.1-20210804+git230369cd07 +1.19.0 diff --git a/src/libmongoc b/src/libmongoc index 230369cd0..2ff367a5b 160000 --- a/src/libmongoc +++ b/src/libmongoc @@ -1 +1 @@ -Subproject commit 230369cd070d800545b0c91fd47e1537a50ce6ca +Subproject commit 2ff367a5b6473b3f0dd93b833c530af0db5a0424 diff --git a/tests/manager/manager-ctor-auth_mechanism-error-001.phpt b/tests/manager/manager-ctor-auth_mechanism-error-001.phpt index 80866e65b..a98783e7f 100644 --- a/tests/manager/manager-ctor-auth_mechanism-error-001.phpt +++ b/tests/manager/manager-ctor-auth_mechanism-error-001.phpt @@ -33,10 +33,7 @@ echo throws(function() { create_test_manager('mongodb://localhost:27017/', ['password' => 'password', 'authMechanism' => 'MONGODB-X509']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; -echo throws(function() { - create_test_manager('mongodb://localhost:27017/?authSource=foo'); -}, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; - +// TODO: This test case should be removed by PHPC-1950 echo throws(function() { create_test_manager('mongodb://localhost:27017/', ['authSource' => 'foo']); }, "MongoDB\Driver\Exception\InvalidArgumentException"), "\n"; @@ -60,7 +57,5 @@ Failed to parse URI options: 'SCRAM-SHA-1' authentication mechanism requires use OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: X509 authentication mechanism does not accept a password. OK: Got MongoDB\Driver\Exception\InvalidArgumentException -Failed to parse MongoDB URI: 'mongodb://localhost:27017/?authSource=foo'. Default authentication mechanism requires username. -OK: Got MongoDB\Driver\Exception\InvalidArgumentException Failed to parse URI options: Default authentication mechanism requires username. ===DONE===