Previously a user could insert a VDU function into one of the _replicator
databases such that it prevents the replicator application from updating
documents in that db. Replicator application would then crash and prevent
replications from running on the whole cluster.

To avoid crashing the replicator when saving documents, log the error
and return `{ok, forbidden}`. The return might seem odd but we are
asserting that forbidden is an OK value in this context and explicitly
handling it. This shape of the return also conforms to the expected
`{ok, _Rev}` result, noticing that `_Rev` is never actually used.

- [x] Code is written and works correctly;
- [x] Changes are covered by tests;

[ Full content available at: https://github.com/apache/couchdb/pull/1631 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to