Problem Statement/Rationale
mongosh does not validate the timestamp value passed in
Please be sure to attach relevant logs with any sensitive data redacted.
Steps to Reproduce
"Overflow in mongosh"
[direct: mongos] test> var a = Timestamp(16577179010) [direct: mongos] test> a Timestamp({ t: -602690174, i: 0 }) [direct: mongos] test> // Compared to mongo mongos> var a = Timestamp(16577179010,0) Error: Timestamp time (seconds) must be non-negative and not greater than 4294967295, got 16577179010 : @(shell):1:9
Expected Results
Same outcome as in mongo
Actual Results
Incorrect value gets accepted resulting into an overflow
Additional Notes
none
- depends on
-
NODE-4019 BSON V5
- Development Complete
-
NODE-4706 Validate Timestamp t,i constructor values
- Closed
- related to
-
MONGOSH-1358 Update to driver and bson v5.x
- Closed