From d748a328aec166047c81bcaf3dec6b0a885a2088 Mon Sep 17 00:00:00 2001 From: Paul Joseph Davis Date: Sat, 9 May 2009 19:06:08 +0000 Subject: Check for invalid document members. Removes a guard that only checked for fields with integer values. Adds tests to basics.js git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@773260 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_doc.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/couchdb') diff --git a/src/couchdb/couch_doc.erl b/src/couchdb/couch_doc.erl index 4d2affa4..906a5725 100644 --- a/src/couchdb/couch_doc.erl +++ b/src/couchdb/couch_doc.erl @@ -215,7 +215,7 @@ transfer_fields([{<<"_deleted_conflicts">>, _} | Rest], Doc) -> transfer_fields(Rest, Doc); % unknown special field -transfer_fields([{<<"_",Name/binary>>, Start} | _], _) when is_integer(Start) -> +transfer_fields([{<<"_",Name/binary>>, _} | _], _) -> throw({doc_validation, ?l2b(io_lib:format("Bad special document member: _~s", [Name]))}); -- cgit v1.2.3