[MONGOCRYPT-570] Do not apply default to min/max values for int/long/date Created: 12/Apr/23 Updated: 28/Oct/23 Resolved: 24/Apr/23 |
|
| Status: | Closed |
| Project: | Libmongocrypt |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.8.0, 1.8.0-alpha1 |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Kevin Albertson | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Binding Changes: | Not Needed |
| Description |
Scope
Background & Motivationlibmongocrypt applies a default min/max to int/long/date. Requiring min/max for int/long/date matches the server behavior: https://github.com/mongodb/mongo/blob/ce9ae383244dc01c8961e3052ca9f48a0008c80d/src/mongo/crypto/encryption_fields_validation.cpp#L147-L155 Not requiring a min/max may be a convenience to users. But, requiring the values may reduce risk of users unintentionally omitting min or max. Encrypting with an incorrect min or max may result in incorrect query results. Adding a default value to min and max can be considered in the future without making a backwards breaking change. |
| Comments |
| Comment by Githook User [ 24/Apr/23 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message:
They were incorrectly testing double. |
| Comment by Cloud GitHub Webhooks [ 24/Apr/23 ] |
|
kevinAlbs merged a pull request (MONGOCRYPT-570 require `min` and `max` for `int` `long` and `date`) into the following branch: |