couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r898651 - /couchdb/trunk/src/couchdb/couch_httpd_auth.erl
Date Wed, 13 Jan 2010 05:12:21 GMT
Author: jchris
Date: Wed Jan 13 05:12:21 2010
New Revision: 898651

URL: http://svn.apache.org/viewvc?rev=898651&view=rev
Log:
validate use doc type

Modified:
    couchdb/trunk/src/couchdb/couch_httpd_auth.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd_auth.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_auth.erl?rev=898651&r1=898650&r2=898651&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_auth.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_auth.erl Wed Jan 13 05:12:21 2010
@@ -175,7 +175,7 @@
             <<"validate_doc_update">>,
             <<"function(newDoc, oldDoc, userCtx) {
                 if ((oldDoc || newDoc).type != 'user') {
-                    return;
+                    throw({forbidden : 'doc.type must be user'});
                 } // we only validate user docs for now
                 if (newDoc._deleted === true) {
                     // allow deletes by admins and matching users 



Mime
View raw message