Skip to content

Releases: mongodb/mongo-go-driver

MongoDB Go Driver 1.5.1

30 Mar 18:59
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release 1.5.1 of the official Go driver.

This release contains several bug fixes. Due to the issue below, we recommend all users upgrade to this version of the driver.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

CVE-2021-20329

This CVE describes a security issue with the driver's BSON marshalling system. BSON marshalling functions would incorrectly handle null bytes embedded in BSON key names and the pattern/options fields of a BSON regex value. BSON marshalling functions now correctly validate and error if there is an embedded null byte in BSON key names or the pattern/options fields of a BSON regex value. We recommend all users of the driver upgrade to this version.

CVE ID: CVE-2021-20329
Title: Specific cstrings input may not be properly validated in the MongoDB Go Driver
Description: Specific cstrings input may not be properly validated in the MongoDB Go Driver when marshalling Go objects into BSON. A malicious user could use a Go object with specific string to potentially inject additional fields into marshalled documents. This issue affects all MongoDB GO Drivers up to (and including) 1.5.0.
CVSS score: 6.8
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
Affected products and versions, MongoDB Go Driver versions <= 1.5.0
Underlying operating systems affected: All

Release Notes

For a full list of tickets included in this release, please see the links below:

Bugs

Tasks

MongoDB Go Driver 1.5.0

09 Mar 18:43
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release 1.5.0 of the official Go driver.

This release contains several new features and usability improvements for the driver.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

API Improvements

This release contains a new errors API for the primary mongo package. Users can now detect duplicate key errors, timeouts, and network errors via the mongo.IsDuplicateKeyError, mongo.IsTimeout, and mongo.IsNetworkError functions, respectively. Additionally, a new UpdateByID function has been added to the mongo.Collection type to update a single document with a given _id value.

Client-Side Field Level Encryption Improvements

The Go Driver now supports using GCP and Azure key management services with the client-side field level encryption feature. In addition, AWS key management support has been enhanced to allow authenticating with temporary AWS credentials. See the MongoDB docs for more information about these improvements. Use of client-side field level encryption requires users to install the latest released version of libmongocrypt. Note: This means that existing applications that use this feature will need to upgrade the libmongocrypt dependency when upgrading to this driver version; otherwise, the application will fail to compile. Users can upgrade to the latest development release of libmongocrypt via the OS-specific instructions for macos, Windows, and Linux.

Server Monitoring

Monitoring has now been added for various server events. A ServerMonitor set on a mongo.Client monitors changes on the MongoDB deployment it is connected to and reports the changes in the client's representation of the deployment.

Erroring for Maps as Ordered Arguments

The driver will now error if a map with more than one key is used as a hint option, sort option, or for index creation. This is to prevent unexpected behavior, for example, an index being created with the keys in the wrong order.

Release Notes

For a full list of tickets included in this release, please see the links below:
Projects:

Projects

New Features

Improvements

Bugs

Tasks

MongoDB Go Driver 1.4.7

09 Mar 18:18
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release 1.4.7 of the official Go driver.

This release contains several bug fixes and internal testing improvements. Most notably, GODRIVER-1879 is fixed in this release. This ticket ensures that the connectTimeoutMS URI option, which defaults to 30 seconds, applies to both the creation of a socket and the TLS handshake, if applicable.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

For a full list of tickets included in this release, please see the links below:
Projects:

Improvements

Bugs

MongoDB Go Driver 1.4.6

02 Feb 18:13
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release version 1.4.6 of the official Go driver.

This release contains several bug fixes.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

For a full list of tickets included in this release, please see the link below:

Bugs

MongoDB Go Driver 1.4.5

19 Jan 20:16
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release 1.4.5 of the official Go driver.

This release contains several bug fixes.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

For a full list of tickets included in this release, please see the links below:

Improvements

Bugs

MongoDB Go Driver 1.5.0-beta1

16 Dec 22:18
Compare
Choose a tag to compare
Pre-release

The MongoDB Go driver team is pleased to release 1.5.0-beta1 of the official Go driver.

This release contains driver-specific improvements.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Azure/GCP Support for Client Side Field Level Encryption

This release includes beta support for using Azure and GCP key management with the client-side field level encryption feature. See the MongoDB docs for more information and code samples. Use of client-side field level encryption, even without Azure/GCP, requires users to install the latest development release of libmongocrypt. Note: This means that existing applications that use this feature will need to upgrade the libmongocrypt dependency when upgrading to this driver release; otherwise, the application will fail to build. Users can upgrade to the latest development release of libmongocrypt via the OS-specific instructions for macos, Windows, and Linux. Each OS-specific link contains instructions for installing both the latest stable and dev releases.

Server Monitoring

Monitoring has now been added for various server events. A ServerMonitor set on a client monitors changes on the MongoDB deployment it is connected to, and reports the changes in the client's representation of the deployment.

ServerError

The ServerError interface wraps errors returned from the server, specifically CommandError, WriteException, and BulkWriteException, to make them easier to handle programmatically.

Improved BSON performance

Improved unmarshalling performance when unmarshalling to interface{}. There are no application changes required to take advantage of these improements.

Release Notes

For a full list of tickets included in this release, please see the links below:

Projects

New Features

Improvements

Tasks

MongoDB Go Driver 1.4.4

01 Dec 20:37
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release 1.4.4 of the official Go driver.

This release contains several bug fixes.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Bug

  • [GODRIVER-1777] - allow inline struct fields to be overwritten by higher level structs in bson
  • [GODRIVER-1782] - Aggregation with $out not always sent to primary
  • [GODRIVER-1783] - omitempty doesnt work on primitive.Decimal128
  • [GODRIVER-1788] - Audit missing replaceErrors calls
  • [GODRIVER-1793] - Allow nil options for InsertOne

Improvement

  • [GODRIVER-1767] - Mark mtest package as internal and unstable
  • [GODRIVER-1798] - Add reference to how to authenticate yourself in the database in the main README file

MongoDB Go Driver 1.4.3

03 Nov 20:04
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release 1.4.3 of the official Go driver.

This release contains several bug fixes.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Bug

  • [GODRIVER-1757] - Security Vulnerability: system DLL loaded without path specified
  • [GODRIVER-1768] - Incorrect docs for unmarshaling BSON Null to bson.M
  • [GODRIVER-1769] - Collection.FindOne option MaxTime not working
  • [GODRIVER-1770] - GridFS download chunk size should be read from files document, not bucket

Task

MongoDB Go Driver 1.4.2

07 Oct 13:53
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release 1.4.2 of the official Go driver.

This release contains several bug fixes, a fix to our existing deprecation notices to ensure they follow the format required by linters such as staticcheck, and an upgrade to our go-yaml dependency so the driver is not susceptible to CVE-2019-11254.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Bug

Task

Improvement

  • [GODRIVER-1739] - Ensure retryable writes testing checks for absence/presence of error labels
  • [GODRIVER-1741] - Specify error label in retryable writes test

MongoDB Go Driver 1.4.1

01 Sep 18:04
Compare
Choose a tag to compare

The MongoDB Go driver team is pleased to release 1.4.1 of the official Go driver.

This release contains several bugfixes.

Documentation can be found on pkg.go.dev and the MongoDB documentation site. BSON library documentation is also available on pkg.go.dev. Questions and inquiries can be asked on the MongoDB Developer Community. Bugs can be reported in the Go Driver Jira where a list of current issues can be found.

Release Notes

Bug

  • [GODRIVER-1028] - BulkWrite error indexes do not match position in models slice
  • [GODRIVER-1706] - Name is not set for WriteConcernError
  • [GODRIVER-1710] - TLS ServerName should not set if it's provided in a custom config
  • [GODRIVER-1713] - RunCommand does not pass read preference to operations layer
  • [GODRIVER-1726] - ProcessError should check for WriteCommandError, not WriteConcernError

Task

Improvement

  • [GODRIVER-1703] - Change Session examples to use transactions
  • [GODRIVER-1719] - fix data race in test TestSDAMProse/heartbeats_processed_more_frequently