Details
-
Improvement
-
Resolution: Fixed
-
Major
-
None
-
Security Level: Public
-
None
-
CBG Sprint 79
-
5
Description
In 2.8.0, GetDeepMutableBody logs a warning and returns nil if it's passed malformed JSON. If callers aren't checking for this case, subsequent code may panic on a nil Body.
There's been at least one reported case of this, but it's unclear whether the GetDeepMutableBody invocation is the one in documentUpdateFunc or resolveConflict.
Both should be tested with malformed JSON. In the case of documentUpdateFunc, the rev should be rejected, instead of a panic being caught by the recover in blip_sync_context. For conflict resolver, should return as resolveError.