Updated Branches: refs/heads/master bea76dbf5 -> 05858792a
Fix attachment name validation when creating inline attachments. Do not allow names to start with an underscore. Closes COUCHDB-1210. Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/05858792 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/05858792 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/05858792 Branch: refs/heads/master Commit: 05858792ace840206d083b2b3cd7367d1b45221a Parents: bea76db Author: Jan Lehnardt <[email protected]> Authored: Sat Oct 29 17:54:49 2011 +0200 Committer: Jan Lehnardt <[email protected]> Committed: Sat Oct 29 17:54:49 2011 +0200 ---------------------------------------------------------------------- src/couchdb/couch_httpd_db.erl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/05858792/src/couchdb/couch_httpd_db.erl ---------------------------------------------------------------------- diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 413779b..90ca33a 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -206,6 +206,7 @@ db_req(#httpd{method='GET',path_parts=[_DbName]}=Req, Db) -> db_req(#httpd{method='POST',path_parts=[DbName]}=Req, Db) -> couch_httpd:validate_ctype(Req, "application/json"), Doc = couch_doc:from_json_obj(couch_httpd:json_body(Req)), + validate_attachment_names(Doc), Doc2 = case Doc#doc.id of <<"">> -> Doc#doc{id=couch_uuids:new(), revs={0, []}};
