You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Jason Smith (JIRA)" <ji...@apache.org> on 2012/09/14 04:08:07 UTC

[jira] [Created] (COUCHDB-1534) Objects allowed for query_params in /_replicator but not /_replicate

Jason Smith created COUCHDB-1534:
------------------------------------

             Summary: Objects allowed for query_params in /_replicator but not /_replicate 
                 Key: COUCHDB-1534
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1534
             Project: CouchDB
          Issue Type: Bug
          Components: Replication
    Affects Versions: 1.2.1
         Environment: CouchDB 1.2.x
            Reporter: Jason Smith
            Priority: Minor


Using the replicator DB, I can set a `query_params` value to an arbitrary JSON object. CouchDB passes is as-is to filter functions as `req.query`, no problemo.

But the same parameters in a POST body to /_replicate are rejected because the value is not a string.

Is this just a vestigial data sanitization routine? I think it is. I have a commit to remove it, used by an Iris Couch customer, and I will make a branch with this ticket ID to add some unit tests to make sure.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (COUCHDB-1534) Objects allowed for query_params in /_replicator but not /_replicate

Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455543#comment-13455543 ] 

Paul Joseph Davis commented on COUCHDB-1534:
--------------------------------------------

Looking over the code I don't really even see a reason for this function to exist. Seems awfully limiting and its not really checking for validity of anything possibly used later in replicator code. I'd just go ahead and delete the whole thing and not bother with this at all.
                
> Objects allowed for query_params in /_replicator but not /_replicate 
> ---------------------------------------------------------------------
>
>                 Key: COUCHDB-1534
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1534
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.2.1
>         Environment: CouchDB 1.2.x
>            Reporter: Jason Smith
>            Priority: Minor
>
> Using the replicator DB, I can set a `query_params` value to an arbitrary JSON object. CouchDB passes is as-is to filter functions as `req.query`, no problemo.
> But the same parameters in a POST body to /_replicate are rejected because the value is not a string.
> Is this just a vestigial data sanitization routine? I think it is. I have a commit to remove it, used by an Iris Couch customer, and I will make a branch with this ticket ID to add some unit tests to make sure.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (COUCHDB-1534) Objects allowed for query_params in /_replicator but not /_replicate

Posted by "Jason Smith (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455551#comment-13455551 ] 

Jason Smith commented on COUCHDB-1534:
--------------------------------------

I realize I began with my jiu-jitsu patch which is not appropriate for upstream CouchDB. Anyway the change needs to be ported to the 1.3 codebase.

I'll do what you say and I suppose add unit tests.
                
> Objects allowed for query_params in /_replicator but not /_replicate 
> ---------------------------------------------------------------------
>
>                 Key: COUCHDB-1534
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1534
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Replication
>    Affects Versions: 1.2.1
>         Environment: CouchDB 1.2.x
>            Reporter: Jason Smith
>            Priority: Minor
>
> Using the replicator DB, I can set a `query_params` value to an arbitrary JSON object. CouchDB passes is as-is to filter functions as `req.query`, no problemo.
> But the same parameters in a POST body to /_replicate are rejected because the value is not a string.
> Is this just a vestigial data sanitization routine? I think it is. I have a commit to remove it, used by an Iris Couch customer, and I will make a branch with this ticket ID to add some unit tests to make sure.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira