Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-2326

Attempts to PUT malformed security object result in {"error":"error","reason":"no_majority"}

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • 2.0.1
    • Database Core
    • None
    • Regular Contributors Level (Easy to Medium)

    Description

      Attempts to write security objects where the "admins" or "members" values are malformed will result in an HTTP 500 response with the following body:

      {"error":"error","reason":"no_majority"}

      This should really be an HTTP 400 response with a "bad_request" error value and a different error reason.

      To reproduce:

      $ curl -X PUT http://localhost:15984/test
      {"ok":true}
      $ curl -X PUT http://localhost:15984/test/_security -d '{"admins":[]}'
      {"error":"error","reason":"no_majority"}
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mikewallace Mike Wallace
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: