-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Queryable Encryption
-
None
-
Fully Compatible
-
ALL
-
Security 2022-10-31, Security 2022-11-28
Scope
Use std::numeric_limits<double>::lowest(), not std::numeric_limits<double>::min(), for the default index minimum value for double.
std::numeric_limits<double>::min() is used in the following locations:
- https://github.com/10gen/mongo-enterprise-modules/blob/6c4838bb372038ed54b70a60ef33e1fd32b90acd/src/fle/query_analysis/encryption_schema_tree.cpp#L553
- https://github.com/mongodb/mongo/blob/0b52d4cbc8610b5b42f62ff5ac1f1d6a4b47180b/src/mongo/crypto/encryption_fields_validation.cpp#L106
Background & Motivation
SERVER-70066 applied changes to prohibit setting a custom minimum and maximum index value for double. std::numeric_limits<double>::min() returns the minimum positive normalized value.
The expected behavior is to use std::numeric_limits<double>::lowest(), the lowest negative value.
The index min/max has no impact on how double is encoded in getTypeInfoDouble. But it is applied to getMinCover when an infinite bound is specified:
- duplicates
-
SERVER-69671 FLE2 range float precision: update createCollection to enforce parameter constraints
- Closed
- is caused by
-
SERVER-70066 createCollection should not allow min/max for floats
- Closed