From 9032cfd7e12c5935982dd0c8b4e3d0be15c869fa Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Tue, 10 Nov 2009 11:40:01 +0000 Subject: Add doc id validation when creating a new document with the standalone attachment API. Closes COUCHDB-565. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@834436 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_db.erl | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 88c51cf7..da62ccb4 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -958,6 +958,7 @@ db_attachment_req(#httpd{method=Method}=Req, Db, DocId, FileNameParts) Doc = case extract_header_rev(Req, couch_httpd:qs_value(Req, "rev")) of missing_rev -> % make the new doc + couch_doc:validate_docid(DocId), #doc{id=DocId}; Rev -> case couch_db:open_doc_revs(Db, DocId, [Rev], []) of -- cgit v1.2.3