From 4341d0401cf9501514eaba02af735893769c1ff2 Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Tue, 8 Jul 2025 15:36:59 -0400 Subject: [PATCH 1/2] add failing test --- test/test-mongocrypt-ctx-encrypt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test-mongocrypt-ctx-encrypt.c b/test/test-mongocrypt-ctx-encrypt.c index ad7419812..92ddf9218 100644 --- a/test/test-mongocrypt-ctx-encrypt.c +++ b/test/test-mongocrypt-ctx-encrypt.c @@ -983,6 +983,7 @@ static void _test_encrypt_init_each_cmd(_mongocrypt_tester_t *tester) { _init_ok(tester, "{'compactStructuredEncryptionData': 'coll'}"); _init_bypass(tester, "{'hello': 1}"); _init_bypass(tester, "{'buildInfo': 1}"); + _init_bypass(tester, "{'buildinfo': 1}"); _init_bypass(tester, "{'getCmdLineOpts': 1}"); _init_bypass(tester, "{'getLog': 1}"); _init_ok(tester, "{'collMod': 'coll'}"); From eefafd7925b4d1a679e1afaf48e2b1d88f46efbb Mon Sep 17 00:00:00 2001 From: Kevin Albertson Date: Tue, 8 Jul 2025 15:37:23 -0400 Subject: [PATCH 2/2] MONGOCRYPT-822 bypass "buildinfo" command To match server behavior. Server supports both "buildInfo" and "buildinfo" --- src/mongocrypt-ctx-encrypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mongocrypt-ctx-encrypt.c b/src/mongocrypt-ctx-encrypt.c index be011158f..8f5c65b2b 100644 --- a/src/mongocrypt-ctx-encrypt.c +++ b/src/mongocrypt-ctx-encrypt.c @@ -2172,7 +2172,8 @@ _check_cmd_for_auto_encrypt(mongocrypt_binary_t *cmd, bool *bypass, char **targe eligible = true; } else if (0 == strcmp(cmd_name, "hello")) { *bypass = true; - } else if (0 == strcmp(cmd_name, "buildInfo")) { + } else if (0 == strcmp(cmd_name, "buildInfo") || 0 == strcmp(cmd_name, "buildinfo")) { + // Accept either case form to match server behavior. *bypass = true; } else if (0 == strcmp(cmd_name, "getCmdLineOpts")) { *bypass = true;