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 736948646 for ; Mon, 8 Aug 2011 18:36:51 +0000 (UTC) Received: (qmail 56318 invoked by uid 500); 8 Aug 2011 18:36:50 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 56258 invoked by uid 500); 8 Aug 2011 18:36:49 -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 56234 invoked by uid 99); 8 Aug 2011 18:36:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2011 18:36:49 +0000 X-ASF-Spam-Status: No, hits=-2000.8 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2011 18:36:48 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A661DB117B for ; Mon, 8 Aug 2011 18:36:27 +0000 (UTC) Date: Mon, 8 Aug 2011 18:36:27 +0000 (UTC) From: "Robert Newson (JIRA)" To: dev@couchdb.apache.org Message-ID: <1397960204.17343.1312828587677.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1572705831.17052.1312823907349.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (COUCHDB-1242) Filtered replication silently converts all query parameters to strings 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-1242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Newson updated COUCHDB-1242: ----------------------------------- Attachment: 0001-throw-400-bad_request-if-any-query_params-value-is-n.patch Patch for 1.0.x (should be similar for 1.1.x and completely wrong for trunk) > Filtered replication silently converts all query parameters to strings > ---------------------------------------------------------------------- > > Key: COUCHDB-1242 > URL: https://issues.apache.org/jira/browse/COUCHDB-1242 > Project: CouchDB > Issue Type: Bug > Affects Versions: 1.0.2, 1.1 > Reporter: Robert Newson > Assignee: Robert Newson > Attachments: 0001-throw-400-bad_request-if-any-query_params-value-is-n.patch > > > All filtered query params are silently converted to strings. this causes tests for if (req.query.foo) to evaluate to true even for {"query_params":{"foo":false}} because "false" is true. > No clean solution exists to fix this as _changes has a GET entry point and request parameters are untyped. > Suggested fix is to scan the query_params in handle_replicate_req and throw a 400 Bad Request if any value is not a JSON string. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira