rnewson commented on a change in pull request #862: Whitelist system DB names
as valid _dbs docids
URL: https://github.com/apache/couchdb/pull/862#discussion_r142642627
##########
File path: src/couch/src/couch_doc.erl
##########
@@ -191,6 +198,15 @@ parse_revs(_) ->
throw({bad_request, "Invalid list of revisions"}).
+validate_docid(DocId, DbName) ->
+ case DbName =:= ?l2b(config:get("mem3", "shards_db", "_dbs")) andalso
+ lists:member(DocId, ?SYSTEM_DATABASES) of
Review comment:
assert in the function head that DocId is binary, just in case.
----------------------------------------------------------------
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