diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-11-21 14:05:27 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-11-21 14:05:27 +0000 |
commit | 3112aa0692df79d0d92b92842e5de971bfc90fa9 (patch) | |
tree | ad6822dc442c573f66213300f8f5dc0ca3adc12b /share/server | |
parent | b66135d62c754bdedec9db49f93cd899099975dd (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.1.x@1037450 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/server')
-rw-r--r-- | share/server/loop.js | 1 | ||||
-rw-r--r-- | share/server/util.js | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/share/server/loop.js b/share/server/loop.js index d5bbd977..d2a07f61 100644 --- a/share/server/loop.js +++ b/share/server/loop.js @@ -26,6 +26,7 @@ function init_sandbox() { sandbox.start = Render.start; sandbox.send = Render.send; sandbox.getRow = Render.getRow; + sandbox.isArray = isArray; } catch (e) { log(e.toSource()); } diff --git a/share/server/util.js b/share/server/util.js index 71a36a29..1b57f041 100644 --- a/share/server/util.js +++ b/share/server/util.js @@ -124,3 +124,7 @@ function log(message) { } respond(["log", String(message)]); }; + +function isArray(obj) { + return toString.call(obj) === "[object Array]"; +} |