You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Benjamin Young (JIRA)" <ji...@apache.org> on 2011/01/12 22:48:53 UTC

[jira] Created: (COUCHDB-1026) Database names are not encoded in the rewriter

Database names are not encoded in the rewriter
----------------------------------------------

                 Key: COUCHDB-1026
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1026
             Project: CouchDB
          Issue Type: Bug
          Components: HTTP Interface
    Affects Versions: 1.0.1
            Reporter: Benjamin Young


If a database includes special characters (such as / "forward slash"), then the rewriter will fail to find the correct database and send a 404 error:
{"error":"not_found","reason":"no_db_file"}

The attached patch simply adds a url_encode step around DbName.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Updated] (COUCHDB-1026) Database names are not encoded in the rewriter

Posted by "max ogden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

max ogden updated COUCHDB-1026:
-------------------------------

    Attachment: rewrite_db_with_forward_slashes.js

Here is a futon test that exacerbates the issue. Included are two tests, one without a forward slash that passes and then a copy of that test changed to use a database containing a forward slash. The second test should fail

> Database names are not encoded in the rewriter
> ----------------------------------------------
>
>                 Key: COUCHDB-1026
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1026
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.0.1
>            Reporter: Benjamin Young
>         Attachments: encode_db_name_in_rewriter.patch, rewrite_db_with_forward_slashes.js
>
>
> If a database includes special characters (such as / "forward slash"), then the rewriter will fail to find the correct database and send a 404 error:
> {"error":"not_found","reason":"no_db_file"}
> The attached patch simply adds a url_encode step around DbName.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (COUCHDB-1026) Database names are not encoded in the rewriter

Posted by "Benjamin Young (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Young updated COUCHDB-1026:
------------------------------------

    Attachment: encode_db_name_in_rewriter.patch

> Database names are not encoded in the rewriter
> ----------------------------------------------
>
>                 Key: COUCHDB-1026
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1026
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.0.1
>            Reporter: Benjamin Young
>         Attachments: encode_db_name_in_rewriter.patch
>
>
> If a database includes special characters (such as / "forward slash"), then the rewriter will fail to find the correct database and send a 404 error:
> {"error":"not_found","reason":"no_db_file"}
> The attached patch simply adds a url_encode step around DbName.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Commented] (COUCHDB-1026) Database names are not encoded in the rewriter

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

max ogden commented on COUCHDB-1026:
------------------------------------

a more concise description of this bug: it disallows any database with a forward slash to utilize /_rewrite. pretty sucky

> Database names are not encoded in the rewriter
> ----------------------------------------------
>
>                 Key: COUCHDB-1026
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1026
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.0.1
>            Reporter: Benjamin Young
>         Attachments: encode_db_name_in_rewriter.patch, rewrite_db_with_forward_slashes.js
>
>
> If a database includes special characters (such as / "forward slash"), then the rewriter will fail to find the correct database and send a 404 error:
> {"error":"not_found","reason":"no_db_file"}
> The attached patch simply adds a url_encode step around DbName.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1026) Database names are not encoded in the rewriter

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

Robert Newson commented on COUCHDB-1026:
----------------------------------------

The committed patch is not the one attached to this JIRA as no license was granted.
                
> Database names are not encoded in the rewriter
> ----------------------------------------------
>
>                 Key: COUCHDB-1026
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1026
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.0.1
>            Reporter: Benjamin Young
>            Priority: Blocker
>             Fix For: 1.3
>
>         Attachments: ASF.LICENSE.NOT.GRANTED--encode_db_name_in_rewriter.patch, rewrite_db_with_forward_slashes.js
>
>
> If a database includes special characters (such as / "forward slash"), then the rewriter will fail to find the correct database and send a 404 error:
> {"error":"not_found","reason":"no_db_file"}
> The attached patch simply adds a url_encode step around DbName.

--
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] [Resolved] (COUCHDB-1026) Database names are not encoded in the rewriter

Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Newson resolved COUCHDB-1026.
------------------------------------

    Resolution: Fixed
    
> Database names are not encoded in the rewriter
> ----------------------------------------------
>
>                 Key: COUCHDB-1026
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1026
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.0.1
>            Reporter: Benjamin Young
>            Priority: Blocker
>             Fix For: 1.3
>
>         Attachments: ASF.LICENSE.NOT.GRANTED--encode_db_name_in_rewriter.patch, rewrite_db_with_forward_slashes.js
>
>
> If a database includes special characters (such as / "forward slash"), then the rewriter will fail to find the correct database and send a 404 error:
> {"error":"not_found","reason":"no_db_file"}
> The attached patch simply adds a url_encode step around DbName.

--
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] [Updated] (COUCHDB-1026) Database names are not encoded in the rewriter

Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Newson updated COUCHDB-1026:
-----------------------------------

         Priority: Blocker  (was: Major)
    Fix Version/s: 1.3
    
> Database names are not encoded in the rewriter
> ----------------------------------------------
>
>                 Key: COUCHDB-1026
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1026
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.0.1
>            Reporter: Benjamin Young
>            Priority: Blocker
>             Fix For: 1.3
>
>         Attachments: ASF.LICENSE.NOT.GRANTED--encode_db_name_in_rewriter.patch, rewrite_db_with_forward_slashes.js
>
>
> If a database includes special characters (such as / "forward slash"), then the rewriter will fail to find the correct database and send a 404 error:
> {"error":"not_found","reason":"no_db_file"}
> The attached patch simply adds a url_encode step around DbName.

--
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-1026) Database names are not encoded in the rewriter

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

Benjamin Young commented on COUCHDB-1026:
-----------------------------------------

The committed patch:
https://git-wip-us.apache.org/repos/asf?p=couchdb.git;a=commitdiff;h=272d641529e6cde5a24ed73e827e27ef52c87d2a
                
> Database names are not encoded in the rewriter
> ----------------------------------------------
>
>                 Key: COUCHDB-1026
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1026
>             Project: CouchDB
>          Issue Type: Bug
>          Components: HTTP Interface
>    Affects Versions: 1.0.1
>            Reporter: Benjamin Young
>            Priority: Blocker
>             Fix For: 1.3
>
>         Attachments: ASF.LICENSE.NOT.GRANTED--encode_db_name_in_rewriter.patch, rewrite_db_with_forward_slashes.js
>
>
> If a database includes special characters (such as / "forward slash"), then the rewriter will fail to find the correct database and send a 404 error:
> {"error":"not_found","reason":"no_db_file"}
> The attached patch simply adds a url_encode step around DbName.

--
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