wohali 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_r142770298
##########
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:
as we discussed on IRC, `lists:member` can handle a list being passed in as
DocId, so we'll leave this be for now.
```
1> Foo = [["a", "b"], "c", "d"].
[["a","b"],"c","d"]
2> lists:member(["a", "b"], Foo).
true
```
----------------------------------------------------------------
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