[CDRIVER-2508] Prohibit writeConcern values less than -1 Created: 15/Feb/18 Updated: 28/Oct/23 Resolved: 15/Feb/18 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | libmongoc, uri |
| Affects Version/s: | None |
| Fix Version/s: | 1.10.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | A. Jesse Jiryu Davis |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||
| Description |
|
We use writeConcern values of "w" -2 through -4 to express special internal meanings. By accident, we also allow these values in URIs like: mongodb://host/?w=-4 and also in BSON documents passed as "opts":
In 1.10, we'll prohibit "w" values less than -1. "w=-1" is still allowed as a deprecated alias for "w=0" ( |
| Comments |
| Comment by Githook User [ 20/Feb/18 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: |
| Comment by A. Jesse Jiryu Davis [ 15/Feb/18 ] |
|
Good point, thanks. I'll update the NEWS entry, this only affects BSON opts. |
| Comment by Jeremy Mikola [ 15/Feb/18 ] |
|
For the record, I believe values less than -1 have been rejected in the URI since 1.9.0 ( That is when PHPC stopped using such values in our URI tests: f609ac7. |
| Comment by A. Jesse Jiryu Davis [ 15/Feb/18 ] |
|
Fixed in patch for |