Title / Description
Code diff --git a/Source/CBLDatabase+Attachments.m b/Source/CBLDatabase+Attachments.m index 618168e..0480fbd 100644 --- a/Source/CBLDatabase+Attachments.m +++ b/Source/CBLDatabase+Attachments.m @@ -521,12 +521,9 @@ static bool digestToBlobKey(NSString* digest, CBLBlobKey* key) { return nil; } id revPosObj = attachInfo[@"revpos"]; - if (revPosObj) { - int revPos = [$castIf(NSNumber, revPosObj) intValue]; - if (revPos <= 0) { - *outStatus = kCBLStatusBadAttachment; - return nil; - } + if (!revPosObj) { // allow any (even bogus) attachInfo[@"revpos"] + *outStatus = kCBLStatusBadAttachment; + return nil; } continue; }
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code