priyabratap commented on issue #1458: CouchDB 1.6.1: Unable to create user 
document inside _users DB
URL: https://github.com/apache/couchdb/issues/1458#issuecomment-406946608
 
 
   I got the solution. In my **_users** table there was a design document 
created **_design/X12635**. After I deleted the document, now It's working 
fine. 
   
   I am not sure, how this document generated and why it's required.
   
   ```
   {
      "_id": "_design/X12635",
      "_rev": "1-12bc5863e7f65bad6ddf51c1748c3e42",
      "language": "erlang",
      "validate_doc_update": "fun ({NewDoc}, OldDoc, UserCtx, 
SecObj)->\n\t%%Covers CVE-2017-12635\n\tRoles = 
proplists:lookup_all(<<\"roles\">>,NewDoc),\n\tcase length(Roles) < 2 
of\n\t\ttrue -> ok;\n\t\tfalse ->throw({[{<<\"forbidden\">>, <<\"You can’t hack 
roles,sorry\">>}]})\n\tend,\n\t1\nend."
   }
   ```
   
   Thanks for your response @wohali 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to