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

Improve _config error handling by validating certain (if not all) values based on their keys

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.1
    • None
    • Futon, HTTP Interface
    • None
    • Regular Contributors Level (Easy to Medium)

    Description

      When saving values via Futon or the HTTP API, it's easy to put in values that are invalid and could make CouchDB unbootable. Some level of validation here would save the day in most cases or the disposal of the incorrect values with a log message (rather than preventing startup).

      In my case, I'd added just <<"http://google.com/">> to the value of the _google key in the httpd_global_handlers section and that prevented CouchDB from starting. The ever fabulous Paul Davis pointed out my error and it was "easy enough" to fix by altering the value in the .ini file to be the correct value...which is:

      {couch_httpd_proxy, handle_proxy_req, <<"http://www.google.com">>}

      In the case of these httpd_global_handlers a simple check that it's an Erlang tuple with at least two terms would be a simple check that would have kept my CouchDB instance up.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bigbluehat Benjamin Young
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: