summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-11-21 14:04:47 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-11-21 14:04:47 +0000
commit882be279b64b291045701895d947f256309f5743 (patch)
tree50a2c162c09ba798f20d7e8f3feeddf6b7087d73 /src/couchdb
parenta281bc40d6545e70e1aae9973e1a8a49aa119fea (diff)
Merged revision 1037448 from trunk:
Proper verification of the roles property of a user document. Closes COUCHDB-790. Thanks Gabriel Farrell. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.0.x@1037449 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/couch_js_functions.hrl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_js_functions.hrl b/src/couchdb/couch_js_functions.hrl
index 1f314f6e..32573a90 100644
--- a/src/couchdb/couch_js_functions.hrl
+++ b/src/couchdb/couch_js_functions.hrl
@@ -31,7 +31,7 @@
throw({forbidden: 'doc.name is required'});
}
- if (!(newDoc.roles && (typeof newDoc.roles.length !== 'undefined'))) {
+ if (newDoc.roles && !isArray(newDoc.roles)) {
throw({forbidden: 'doc.roles must be an array'});
}