tudordumitriu opened a new issue #1712: Validate Document Update oldDoc in 
design document is null for an existing document
URL: https://github.com/apache/couchdb/issues/1712
 
 
   We have a PouchDB client that keeps in sync the client DB with a CouchDB 
server using push / pull replications.
   Also on the server side to ensure that the createdBy field cannot be 
maliciously falsified we are using a validate_doc_update design doc. 
   
   Issue:
   
[doc_server_and_client_versions.txt](https://github.com/apache/couchdb/files/2548112/doc_server_and_client_versions.txt)
   
   For more of our most frequently updated (EXISTING) documents from time to 
time it happens that the oldDoc is null in the server execution of the 
validate_doc_update, and hence identified as a malicious creation (other 
createdBy user than context user), hence the updated is rejected, but in fact 
this is a document updated, which is perfectly ok.
   
   ## Steps to Reproduce (for bugs)
   As for the steps to reproduce it we didn't manage to pinpoint the scenario 
but we have enabled logging and trying to watch out for these, and we have 
attached the server and client doc versions, design doc, the previous 
_revs_diff and _bulk_docs request that returns the error.
   
[bulk_docs_request_response.txt](https://github.com/apache/couchdb/files/2548068/bulk_docs_request_response.txt)
   
[validate_doc_update.txt](https://github.com/apache/couchdb/files/2548069/validate_doc_update.txt)
   
[revs_diff_request_response.txt](https://github.com/apache/couchdb/files/2548070/revs_diff_request_response.txt)
   
   This has a deep impact in our app, because this document updates from the 
specific client don't get replicated anymore.
   Will try to preserve the context, so that we can provide extra info if needed
   
   ## Your Environment
   <!--- Include as many relevant details about the environment you experienced 
the bug in -->
   * Version used: 2.2.0
   * Browser Name and version: Chrome
   * Operating System and version (desktop or mobile): Windows 10
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to