Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AE752177AE for ; Thu, 29 Jan 2015 11:08:34 +0000 (UTC) Received: (qmail 73170 invoked by uid 500); 29 Jan 2015 11:08:34 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 73106 invoked by uid 500); 29 Jan 2015 11:08:34 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 73095 invoked by uid 99); 29 Jan 2015 11:08:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2015 11:08:34 +0000 Date: Thu, 29 Jan 2015 11:08:34 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@couchdb.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (COUCHDB-2523) CouchDB 2.0: Specifying startkey/endkey parameters alongside a keys parameter when querying /_all_docs should be invalid MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-2523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14296698#comment-14296698 ] ASF GitHub Bot commented on COUCHDB-2523: ----------------------------------------- GitHub user willholley opened a pull request: https://github.com/apache/couchdb-chttpd/pull/19 validate _all_docs query parameters Perform the same query parameter validation in the clustered interface for /_all_docs requests as we do in the non-clustered interface. Fixes COUCHDB-2523. You can merge this pull request into a Git repository by running: $ git pull https://github.com/willholley/couchdb-chttpd 2523-all-docs-validation Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-chttpd/pull/19.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 #19 ---- commit c529d71f782bec9d61f5b7d9e7c17748cee4dded Author: Will Holley Date: 2015-01-29T10:19:34Z validate _all_docs query parameters Perform the same query parameter validation in the clustered interface for /_all_docs requests as we do in the non-clustered interface. COUCHDB-2523 ---- > CouchDB 2.0: Specifying startkey/endkey parameters alongside a keys parameter when querying /_all_docs should be invalid > ------------------------------------------------------------------------------------------------------------------------ > > Key: COUCHDB-2523 > URL: https://issues.apache.org/jira/browse/COUCHDB-2523 > Project: CouchDB > Issue Type: Bug > Security Level: public(Regular issues) > Components: Database Core > Reporter: Will Holley > > CouchDB 1.X validates that the combination of query parameters to _all_docs is valid. For instance, you cannot specify keys and also startkey/endkey: > {code} > curl -g -XGET 'http://127.0.0.1:5984/testdb/_all_docs?keys=["a"]&startkey="a"' > {"error":"query_parse_error","reason":"`keys` is incompatible with `key`, `start_key` and `end_key`"} > {code} > In CouchDB 2.0, there is no such validation: > {code} > curl -g -XGET 'http://127.0.0.1:15984/testdb/_all_docs?keys=["a"]&startkey="a"' > {"total_rows":5,"rows":[ > {"id":"a","key":"a","value":{"rev":"1-4c6114c65e295552ab1019e2b046b10e"}} > ]} > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)