Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4279

[mongocrypt] decryption of array of objects fails with stacktrace

    • 2
    • Not Needed

      What problem are you facing?

      When using CSFLE with mongosh 1.4.1 / 1.4.2, decryption of array of objects fails with stacktrace. Older version (1.2.2) works correctly with the same script.

      Decryption of single field works in the same environment.

      What driver and relevant dependency versions are you using?

      Mongosh 1.4.2

      mongocryptd.exe --version
      = mongos version v5.0.8

      Reproducible on Windows and Linux.

      MongoDB server - Atlas is used.

      KMS: AWS

      Steps to reproduce?

      • (see attached script)
      • create a Master and DEK key
      • perform inserts with client with CSFLE active - works OK
      • perform non-filtered find - `mycoll.find({})`
      • mongo shell returns error mentioning field "code" inside object inside array (attached error1.log)
      • secondĀ  execution of the same command aborts whole shell and shows stacktrace (attached error2.log)
      • `find` performed on encrypted collection with non-FLE session correctly returns binary data in place of encrypted fields / arrays (see encrypted_results.txt)
      • same non-filtered find works OK with older shell (see unencrypted_results.txt)

        1. encrypted_results.txt
          4 kB
        2. error1.log
          0.1 kB
        3. error2.log
          1 kB
        4. test_script.js
          2 kB
        5. unencrypted_results.txt
          3 kB

            Assignee:
            anna.henningsen@mongodb.com Anna Henningsen
            Reporter:
            piotr.likus@mongodb.com Piotr Likus
            Durran Jordan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: