Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Allow users / operators to specify maximum document ID length.

      Currently it is easy to break CouchDB by feeding it large IDs through _bulk_docs endpoint but which will hit the limits of http parser if sent through GET/PUT/DELETE methods. In case those limits are hit the error returned is not obvious as the requests would often crash in the mochiweb http parser step before a request even makes to CouchDB code.

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user nickva opened a pull request:

          https://github.com/apache/couchdb-couch/pull/226

          Allow limiting length of document ID

          Previously it was not possibly to define a maxum document ID size. That meant
          large document ID would hit various limitations and corner cases. For example,
          large document IDs could be inserted via a _bulk_docs endpoint but then trying
          to insert the same document via a single HTTP method like PUT would fail
          because of a limitation in Mochiweb's HTTP parser.

          Let operators specify a maxium document ID length via the:

          ```
          couchdb.max_document_id_length = 0
          ```

          configuration.

          The default value of 0 means current behavior where document ID length is not
          checked.

          COUCHDB-3293

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/cloudant/couchdb-couch couchdb-3293

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/couchdb-couch/pull/226.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #226


          commit 8e1443a8165d07311ab1c0b1a5c0a33fb48de08b
          Author: Nick Vatamaniuc <vatamane@apache.org>
          Date: 2017-02-07T04:53:51Z

          Allow limiting length of document ID

          Previously it was not possibly to define a maxum document ID size. That meant
          large document ID would hit various limitations and corner cases. For example,
          large document IDs could be inserted via a _bulk_docs endpoint but then trying
          to insert the same document via a single HTTP method like PUT would fail
          because of a limitation in Mochiweb's HTTP parser.

          Let operators specify a maxium document ID length via the:

          ```
          couchdb.max_document_id_length = 0
          ```

          configuration.

          The default value of 0 means current behavior where document ID length is not
          checked.

          COUCHDB-3293


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user nickva opened a pull request: https://github.com/apache/couchdb-couch/pull/226 Allow limiting length of document ID Previously it was not possibly to define a maxum document ID size. That meant large document ID would hit various limitations and corner cases. For example, large document IDs could be inserted via a _bulk_docs endpoint but then trying to insert the same document via a single HTTP method like PUT would fail because of a limitation in Mochiweb's HTTP parser. Let operators specify a maxium document ID length via the: ``` couchdb.max_document_id_length = 0 ``` configuration. The default value of 0 means current behavior where document ID length is not checked. COUCHDB-3293 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-couch couchdb-3293 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-couch/pull/226.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #226 commit 8e1443a8165d07311ab1c0b1a5c0a33fb48de08b Author: Nick Vatamaniuc <vatamane@apache.org> Date: 2017-02-07T04:53:51Z Allow limiting length of document ID Previously it was not possibly to define a maxum document ID size. That meant large document ID would hit various limitations and corner cases. For example, large document IDs could be inserted via a _bulk_docs endpoint but then trying to insert the same document via a single HTTP method like PUT would fail because of a limitation in Mochiweb's HTTP parser. Let operators specify a maxium document ID length via the: ``` couchdb.max_document_id_length = 0 ``` configuration. The default value of 0 means current behavior where document ID length is not checked. COUCHDB-3293
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 2a263f84db62e4849a41322b92588c6893169198 in couchdb-couch's branch refs/heads/master from Nick Vatamaniuc
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=2a263f8 ]

          Allow limiting length of document ID

          Previously it was not possibly to define a maxum document ID size. That meant
          large document ID would hit various limitations and corner cases. For example,
          large document IDs could be inserted via a _bulk_docs endpoint but then trying
          to insert the same document via a single HTTP method like PUT would fail
          because of a limitation in Mochiweb's HTTP parser.

          Let operators specify a maxium document ID length via the

          ```
          couchdb.max_document_id_length = infinity | Integer
          ```

          configuration.

          The default value of `infinity` keeps the current behavior where document
          ID length is not checked.

          COUCHDB-3293

          Show
          jira-bot ASF subversion and git services added a comment - Commit 2a263f84db62e4849a41322b92588c6893169198 in couchdb-couch's branch refs/heads/master from Nick Vatamaniuc [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=2a263f8 ] Allow limiting length of document ID Previously it was not possibly to define a maxum document ID size. That meant large document ID would hit various limitations and corner cases. For example, large document IDs could be inserted via a _bulk_docs endpoint but then trying to insert the same document via a single HTTP method like PUT would fail because of a limitation in Mochiweb's HTTP parser. Let operators specify a maxium document ID length via the ``` couchdb.max_document_id_length = infinity | Integer ``` configuration. The default value of `infinity` keeps the current behavior where document ID length is not checked. COUCHDB-3293
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/couchdb-couch/pull/226

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/couchdb-couch/pull/226
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit dc93b29327c245705efdea7bab1ca3d30dec00d2 in couchdb's branch refs/heads/master from Nick Vatamaniuc
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb.git;h=dc93b29 ]

          Bump couch dependency : configurable max document ID

          COUCHDB-3293

          Show
          jira-bot ASF subversion and git services added a comment - Commit dc93b29327c245705efdea7bab1ca3d30dec00d2 in couchdb's branch refs/heads/master from Nick Vatamaniuc [ https://git-wip-us.apache.org/repos/asf?p=couchdb.git;h=dc93b29 ] Bump couch dependency : configurable max document ID COUCHDB-3293
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user iilyak opened a pull request:

          https://github.com/apache/couchdb-chttpd/pull/155

          Mock config module in tests

          The tests in chttpd_db_bulk_get_test do not start config app.
          The change in https://github.com/apache/couchdb-couch/pull/226
          introduces call to config app.
          Make sure we mock config so the tests pass.

          COUCHDB-3293

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/cloudant/couchdb-chttpd couchdb-3293

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/couchdb-chttpd/pull/155.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #155


          commit fdfca9f0af73483fd5c4150ad46be1c79cd09165
          Author: ILYA Khlopotov <iilyak@apache.org>
          Date: 2017-02-09T21:36:39Z

          Mock config module in tests

          The tests in chttpd_db_bulk_get_test do not start config app.
          The change in https://github.com/apache/couchdb-couch/pull/226
          introduces call to config app.
          Make sure we mock config so the tests pass.

          COUCHDB-3293


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user iilyak opened a pull request: https://github.com/apache/couchdb-chttpd/pull/155 Mock config module in tests The tests in chttpd_db_bulk_get_test do not start config app. The change in https://github.com/apache/couchdb-couch/pull/226 introduces call to config app. Make sure we mock config so the tests pass. COUCHDB-3293 You can merge this pull request into a Git repository by running: $ git pull https://github.com/cloudant/couchdb-chttpd couchdb-3293 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-chttpd/pull/155.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #155 commit fdfca9f0af73483fd5c4150ad46be1c79cd09165 Author: ILYA Khlopotov <iilyak@apache.org> Date: 2017-02-09T21:36:39Z Mock config module in tests The tests in chttpd_db_bulk_get_test do not start config app. The change in https://github.com/apache/couchdb-couch/pull/226 introduces call to config app. Make sure we mock config so the tests pass. COUCHDB-3293
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit cae3664d6583adf110302704fb546b4565e19b91 in couchdb-chttpd's branch refs/heads/master from ILYA Khlopotov
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=cae3664 ]

          Mock config module in tests

          The tests in chttpd_db_bulk_get_test do not start config app.
          The change in https://github.com/apache/couchdb-couch/pull/226
          introduces call to config app.
          Make sure we mock config so the tests pass.

          COUCHDB-3293

          Show
          jira-bot ASF subversion and git services added a comment - Commit cae3664d6583adf110302704fb546b4565e19b91 in couchdb-chttpd's branch refs/heads/master from ILYA Khlopotov [ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=cae3664 ] Mock config module in tests The tests in chttpd_db_bulk_get_test do not start config app. The change in https://github.com/apache/couchdb-couch/pull/226 introduces call to config app. Make sure we mock config so the tests pass. COUCHDB-3293
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/couchdb-chttpd/pull/155

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/couchdb-chttpd/pull/155
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 2a263f84db62e4849a41322b92588c6893169198 in couchdb-couch's branch refs/heads/COUCHDB-3288-remove-public-db-record from Nick Vatamaniuc
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=2a263f8 ]

          Allow limiting length of document ID

          Previously it was not possibly to define a maxum document ID size. That meant
          large document ID would hit various limitations and corner cases. For example,
          large document IDs could be inserted via a _bulk_docs endpoint but then trying
          to insert the same document via a single HTTP method like PUT would fail
          because of a limitation in Mochiweb's HTTP parser.

          Let operators specify a maxium document ID length via the

          ```
          couchdb.max_document_id_length = infinity | Integer
          ```

          configuration.

          The default value of `infinity` keeps the current behavior where document
          ID length is not checked.

          COUCHDB-3293

          Show
          jira-bot ASF subversion and git services added a comment - Commit 2a263f84db62e4849a41322b92588c6893169198 in couchdb-couch's branch refs/heads/ COUCHDB-3288 -remove-public-db-record from Nick Vatamaniuc [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=2a263f8 ] Allow limiting length of document ID Previously it was not possibly to define a maxum document ID size. That meant large document ID would hit various limitations and corner cases. For example, large document IDs could be inserted via a _bulk_docs endpoint but then trying to insert the same document via a single HTTP method like PUT would fail because of a limitation in Mochiweb's HTTP parser. Let operators specify a maxium document ID length via the ``` couchdb.max_document_id_length = infinity | Integer ``` configuration. The default value of `infinity` keeps the current behavior where document ID length is not checked. COUCHDB-3293
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 2a263f84db62e4849a41322b92588c6893169198 in couchdb-couch's branch refs/heads/COUCHDB-3287-mixed-db-records from Nick Vatamaniuc
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=2a263f8 ]

          Allow limiting length of document ID

          Previously it was not possibly to define a maxum document ID size. That meant
          large document ID would hit various limitations and corner cases. For example,
          large document IDs could be inserted via a _bulk_docs endpoint but then trying
          to insert the same document via a single HTTP method like PUT would fail
          because of a limitation in Mochiweb's HTTP parser.

          Let operators specify a maxium document ID length via the

          ```
          couchdb.max_document_id_length = infinity | Integer
          ```

          configuration.

          The default value of `infinity` keeps the current behavior where document
          ID length is not checked.

          COUCHDB-3293

          Show
          jira-bot ASF subversion and git services added a comment - Commit 2a263f84db62e4849a41322b92588c6893169198 in couchdb-couch's branch refs/heads/ COUCHDB-3287 -mixed-db-records from Nick Vatamaniuc [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=2a263f8 ] Allow limiting length of document ID Previously it was not possibly to define a maxum document ID size. That meant large document ID would hit various limitations and corner cases. For example, large document IDs could be inserted via a _bulk_docs endpoint but then trying to insert the same document via a single HTTP method like PUT would fail because of a limitation in Mochiweb's HTTP parser. Let operators specify a maxium document ID length via the ``` couchdb.max_document_id_length = infinity | Integer ``` configuration. The default value of `infinity` keeps the current behavior where document ID length is not checked. COUCHDB-3293
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit cae3664d6583adf110302704fb546b4565e19b91 in couchdb-chttpd's branch refs/heads/COUCHDB-3288-remove-public-db-record from ILYA Khlopotov
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=cae3664 ]

          Mock config module in tests

          The tests in chttpd_db_bulk_get_test do not start config app.
          The change in https://github.com/apache/couchdb-couch/pull/226
          introduces call to config app.
          Make sure we mock config so the tests pass.

          COUCHDB-3293

          Show
          jira-bot ASF subversion and git services added a comment - Commit cae3664d6583adf110302704fb546b4565e19b91 in couchdb-chttpd's branch refs/heads/ COUCHDB-3288 -remove-public-db-record from ILYA Khlopotov [ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=cae3664 ] Mock config module in tests The tests in chttpd_db_bulk_get_test do not start config app. The change in https://github.com/apache/couchdb-couch/pull/226 introduces call to config app. Make sure we mock config so the tests pass. COUCHDB-3293
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit cae3664d6583adf110302704fb546b4565e19b91 in couchdb-chttpd's branch refs/heads/COUCHDB-3287-pluggable-storage-engines from ILYA Khlopotov
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=cae3664 ]

          Mock config module in tests

          The tests in chttpd_db_bulk_get_test do not start config app.
          The change in https://github.com/apache/couchdb-couch/pull/226
          introduces call to config app.
          Make sure we mock config so the tests pass.

          COUCHDB-3293

          Show
          jira-bot ASF subversion and git services added a comment - Commit cae3664d6583adf110302704fb546b4565e19b91 in couchdb-chttpd's branch refs/heads/ COUCHDB-3287 -pluggable-storage-engines from ILYA Khlopotov [ https://git-wip-us.apache.org/repos/asf?p=couchdb-chttpd.git;h=cae3664 ] Mock config module in tests The tests in chttpd_db_bulk_get_test do not start config app. The change in https://github.com/apache/couchdb-couch/pull/226 introduces call to config app. Make sure we mock config so the tests pass. COUCHDB-3293
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 2a263f84db62e4849a41322b92588c6893169198 in couchdb-couch's branch refs/heads/2971-count-distinct from Nick Vatamaniuc
          [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=2a263f8 ]

          Allow limiting length of document ID

          Previously it was not possibly to define a maxum document ID size. That meant
          large document ID would hit various limitations and corner cases. For example,
          large document IDs could be inserted via a _bulk_docs endpoint but then trying
          to insert the same document via a single HTTP method like PUT would fail
          because of a limitation in Mochiweb's HTTP parser.

          Let operators specify a maxium document ID length via the

          ```
          couchdb.max_document_id_length = infinity | Integer
          ```

          configuration.

          The default value of `infinity` keeps the current behavior where document
          ID length is not checked.

          COUCHDB-3293

          Show
          jira-bot ASF subversion and git services added a comment - Commit 2a263f84db62e4849a41322b92588c6893169198 in couchdb-couch's branch refs/heads/2971-count-distinct from Nick Vatamaniuc [ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=2a263f8 ] Allow limiting length of document ID Previously it was not possibly to define a maxum document ID size. That meant large document ID would hit various limitations and corner cases. For example, large document IDs could be inserted via a _bulk_docs endpoint but then trying to insert the same document via a single HTTP method like PUT would fail because of a limitation in Mochiweb's HTTP parser. Let operators specify a maxium document ID length via the ``` couchdb.max_document_id_length = infinity | Integer ``` configuration. The default value of `infinity` keeps the current behavior where document ID length is not checked. COUCHDB-3293

            People

            • Assignee:
              Unassigned
              Reporter:
              vatamane Nick Vatamaniuc
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development