[CDRIVER-2834] Some URI parsing errors do not set the bson_error_t. Created: 22/Sep/18 Updated: 28/Oct/23 Resolved: 08/Oct/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc, uri |
| Affects Version/s: | None |
| Fix Version/s: | 1.14.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Kevin Albertson | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
mongoc_uri_new_with_error should set the passed bson_error_t on parsing error. The following two cases do not set the error (and only log a warning). mongodb://localhost/db?heartbeatfrequencyms=10 logs:
but does not set the error. mongodb://localhost/db?zlibcompressionlevel=10 logs:
but does not set the error. These are both validated internally with mongoc_uri_set_option_as_int32, which does not take a bson_error_t. Let's make an internal _mongoc_uri_set_option_as_int32_with_error to pull the error out. |
| Comments |
| Comment by Githook User [ 08/Oct/18 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: |