Updated Branches: refs/heads/1.2.x 8957829fb -> fe48ad86e
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/fe48ad86 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/fe48ad86 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/fe48ad86 Branch: refs/heads/1.2.x Commit: fe48ad86e1f42d8002eeb9acfb96b7a6fc75595a Parents: 8957829 Author: Jan Lehnardt <[email protected]> Authored: Sat Oct 29 17:54:49 2011 +0200 Committer: Jan Lehnardt <[email protected]> Committed: Sat Oct 29 17:56:44 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/fe48ad86/src/couchdb/couch_httpd_db.erl ---------------------------------------------------------------------- diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 80adac3..2b26a1e 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -219,6 +219,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, []}};
