You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by gi...@git.apache.org on 2017/10/04 11:21:49 UTC

[GitHub] rnewson commented on a change in pull request #862: Whitelist system DB names as valid _dbs docids

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_r142641578
 
 

 ##########
 File path: src/chttpd/src/chttpd_db.erl
 ##########
 @@ -711,7 +711,8 @@ db_doc_req(#httpd{method='GET', mochi_req=MochiReq}=Req, Db, DocId) ->
 
 db_doc_req(#httpd{method='POST', user_ctx=Ctx}=Req, Db, DocId) ->
     couch_httpd:validate_referer(Req),
-    couch_doc:validate_docid(DocId),
+    DbName = couch_db:name(Db),
+    couch_doc:validate_docid(DocId, DbName),
 
 Review comment:
   DbName, DocId seems a better ordering, as doc id is subordinate to database. The function name is also (now) misleading.
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services