You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/01/29 12:08:34 UTC

[jira] [Commented] (COUCHDB-2523) CouchDB 2.0: Specifying startkey/endkey parameters alongside a keys parameter when querying /_all_docs should be invalid

    [ 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 <wi...@gmail.com>
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)