You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Thiago Arrais (JIRA)" <ji...@apache.org> on 2011/01/21 19:04:43 UTC

[jira] Created: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

"High ASCII" characters on PUT'ed URL causes db to misbehave
------------------------------------------------------------

                 Key: COUCHDB-1039
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1039
             Project: CouchDB
          Issue Type: Bug
    Affects Versions: 1.0.1, 1.2
            Reporter: Thiago Arrais


I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.

Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)

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


[jira] Updated: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

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

Paul Joseph Davis updated COUCHDB-1039:
---------------------------------------

    Attachment: validate_utf8_docid.patch

We weren't validating document id's that get pulled from URL's to be valid UTF-8. This patch adds a check to couch_doc:validate_id to go over the id and check with similar code that adam wrote for mochijson2:tokenize_string_fast/2.

The only thing that worries me is that this is in the the write path for new docs, but AFAICT, its an unavoidable check. Though someone may want to maybe re-exam putting it in couch_doc:validate_id or in the actual PUT request handler.

> "High ASCII" characters on PUT'ed URL causes db to misbehave
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1039
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1039
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0.1, 1.2
>            Reporter: Thiago Arrais
>         Attachments: badtext.tar.gz, validate_utf8_docid.patch
>
>
> I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.
> Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)

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


[jira] Commented: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

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

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

Bug verified and I think I've got the fix. will update shortly.

> "High ASCII" characters on PUT'ed URL causes db to misbehave
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1039
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1039
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0.1, 1.2
>            Reporter: Thiago Arrais
>         Attachments: badtext.tar.gz
>
>
> I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.
> Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)

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


Re: [jira] Resolved: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

Posted by Sebastian Cohnen <se...@googlemail.com>.
ah, okay. sorry for the noise, I must have missed that. But maybe the ticket's "Fix For" should include 1.0.3 as well.

On 28.01.2011, at 18:05, Paul Davis wrote:

> Here's the commit:
> 
> http://svn.apache.org/viewvc?view=revision&revision=1064421
> 
> On Fri, Jan 28, 2011 at 11:42 AM, Sebastian Cohnen
> <se...@googlemail.com> wrote:
>> I only saw one of your commits (rev 1064417) to trunk. But maybe I'm wrong.
>> 
>> On 28.01.2011, at 16:41, Paul Davis wrote:
>> 
>>> I thought I backported it already.
>>> 
>>> On Fri, Jan 28, 2011 at 1:52 AM, Sebastian Cohnen
>>> <se...@googlemail.com> wrote:
>>>> if this is a blocker, shouldn't this be fixed for 1.0.x as well?
>>>> 
>>>> best,
>>>> sebastian
>>>> 
>>>> 
>>>> Am 28.01.2011 um 02:50 schrieb "Paul Joseph Davis (JIRA)" <ji...@apache.org>:
>>>> 
>>>>> 
>>>>>     [ https://issues.apache.org/jira/browse/COUCHDB-1039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>>>> 
>>>>> Paul Joseph Davis resolved COUCHDB-1039.
>>>>> ----------------------------------------
>>>>> 
>>>>>       Resolution: Fixed
>>>>>    Fix Version/s:     (was: 1.1)
>>>>>                   1.2
>>>>> 
>>>>> Applied in 1064417
>>>>> 
>>>>>> "High ASCII" characters on PUT'ed URL causes db to misbehave
>>>>>> ------------------------------------------------------------
>>>>>> 
>>>>>>                Key: COUCHDB-1039
>>>>>>                URL: https://issues.apache.org/jira/browse/COUCHDB-1039
>>>>>>            Project: CouchDB
>>>>>>         Issue Type: Bug
>>>>>>   Affects Versions: 1.0.1, 1.2
>>>>>>           Reporter: Thiago Arrais
>>>>>>           Priority: Blocker
>>>>>>            Fix For: 1.2
>>>>>> 
>>>>>>        Attachments: badtext.tar.gz, validate_utf8_docid.patch
>>>>>> 
>>>>>> 
>>>>>> I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.
>>>>>> Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)
>>>>> 
>>>>> --
>>>>> This message is automatically generated by JIRA.
>>>>> -
>>>>> You can reply to this email to add a comment to the issue online.
>>>>> 
>>>> 
>> 
>> 


Re: [jira] Resolved: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

Posted by Paul Davis <pa...@gmail.com>.
Here's the commit:

http://svn.apache.org/viewvc?view=revision&revision=1064421

On Fri, Jan 28, 2011 at 11:42 AM, Sebastian Cohnen
<se...@googlemail.com> wrote:
> I only saw one of your commits (rev 1064417) to trunk. But maybe I'm wrong.
>
> On 28.01.2011, at 16:41, Paul Davis wrote:
>
>> I thought I backported it already.
>>
>> On Fri, Jan 28, 2011 at 1:52 AM, Sebastian Cohnen
>> <se...@googlemail.com> wrote:
>>> if this is a blocker, shouldn't this be fixed for 1.0.x as well?
>>>
>>> best,
>>> sebastian
>>>
>>>
>>> Am 28.01.2011 um 02:50 schrieb "Paul Joseph Davis (JIRA)" <ji...@apache.org>:
>>>
>>>>
>>>>     [ https://issues.apache.org/jira/browse/COUCHDB-1039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>>>
>>>> Paul Joseph Davis resolved COUCHDB-1039.
>>>> ----------------------------------------
>>>>
>>>>       Resolution: Fixed
>>>>    Fix Version/s:     (was: 1.1)
>>>>                   1.2
>>>>
>>>> Applied in 1064417
>>>>
>>>>> "High ASCII" characters on PUT'ed URL causes db to misbehave
>>>>> ------------------------------------------------------------
>>>>>
>>>>>                Key: COUCHDB-1039
>>>>>                URL: https://issues.apache.org/jira/browse/COUCHDB-1039
>>>>>            Project: CouchDB
>>>>>         Issue Type: Bug
>>>>>   Affects Versions: 1.0.1, 1.2
>>>>>           Reporter: Thiago Arrais
>>>>>           Priority: Blocker
>>>>>            Fix For: 1.2
>>>>>
>>>>>        Attachments: badtext.tar.gz, validate_utf8_docid.patch
>>>>>
>>>>>
>>>>> I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.
>>>>> Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)
>>>>
>>>> --
>>>> This message is automatically generated by JIRA.
>>>> -
>>>> You can reply to this email to add a comment to the issue online.
>>>>
>>>
>
>

Re: [jira] Resolved: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

Posted by Sebastian Cohnen <se...@googlemail.com>.
I only saw one of your commits (rev 1064417) to trunk. But maybe I'm wrong.

On 28.01.2011, at 16:41, Paul Davis wrote:

> I thought I backported it already.
> 
> On Fri, Jan 28, 2011 at 1:52 AM, Sebastian Cohnen
> <se...@googlemail.com> wrote:
>> if this is a blocker, shouldn't this be fixed for 1.0.x as well?
>> 
>> best,
>> sebastian
>> 
>> 
>> Am 28.01.2011 um 02:50 schrieb "Paul Joseph Davis (JIRA)" <ji...@apache.org>:
>> 
>>> 
>>>     [ https://issues.apache.org/jira/browse/COUCHDB-1039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>> 
>>> Paul Joseph Davis resolved COUCHDB-1039.
>>> ----------------------------------------
>>> 
>>>       Resolution: Fixed
>>>    Fix Version/s:     (was: 1.1)
>>>                   1.2
>>> 
>>> Applied in 1064417
>>> 
>>>> "High ASCII" characters on PUT'ed URL causes db to misbehave
>>>> ------------------------------------------------------------
>>>> 
>>>>                Key: COUCHDB-1039
>>>>                URL: https://issues.apache.org/jira/browse/COUCHDB-1039
>>>>            Project: CouchDB
>>>>         Issue Type: Bug
>>>>   Affects Versions: 1.0.1, 1.2
>>>>           Reporter: Thiago Arrais
>>>>           Priority: Blocker
>>>>            Fix For: 1.2
>>>> 
>>>>        Attachments: badtext.tar.gz, validate_utf8_docid.patch
>>>> 
>>>> 
>>>> I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.
>>>> Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)
>>> 
>>> --
>>> This message is automatically generated by JIRA.
>>> -
>>> You can reply to this email to add a comment to the issue online.
>>> 
>> 


Re: [jira] Resolved: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

Posted by Paul Davis <pa...@gmail.com>.
I thought I backported it already.

On Fri, Jan 28, 2011 at 1:52 AM, Sebastian Cohnen
<se...@googlemail.com> wrote:
> if this is a blocker, shouldn't this be fixed for 1.0.x as well?
>
> best,
> sebastian
>
>
> Am 28.01.2011 um 02:50 schrieb "Paul Joseph Davis (JIRA)" <ji...@apache.org>:
>
>>
>>     [ https://issues.apache.org/jira/browse/COUCHDB-1039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
>>
>> Paul Joseph Davis resolved COUCHDB-1039.
>> ----------------------------------------
>>
>>       Resolution: Fixed
>>    Fix Version/s:     (was: 1.1)
>>                   1.2
>>
>> Applied in 1064417
>>
>>> "High ASCII" characters on PUT'ed URL causes db to misbehave
>>> ------------------------------------------------------------
>>>
>>>                Key: COUCHDB-1039
>>>                URL: https://issues.apache.org/jira/browse/COUCHDB-1039
>>>            Project: CouchDB
>>>         Issue Type: Bug
>>>   Affects Versions: 1.0.1, 1.2
>>>           Reporter: Thiago Arrais
>>>           Priority: Blocker
>>>            Fix For: 1.2
>>>
>>>        Attachments: badtext.tar.gz, validate_utf8_docid.patch
>>>
>>>
>>> I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.
>>> Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>

Re: [jira] Resolved: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

Posted by Sebastian Cohnen <se...@googlemail.com>.
if this is a blocker, shouldn't this be fixed for 1.0.x as well?

best,
sebastian


Am 28.01.2011 um 02:50 schrieb "Paul Joseph Davis (JIRA)" <ji...@apache.org>:

> 
>     [ https://issues.apache.org/jira/browse/COUCHDB-1039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> Paul Joseph Davis resolved COUCHDB-1039.
> ----------------------------------------
> 
>       Resolution: Fixed
>    Fix Version/s:     (was: 1.1)
>                   1.2
> 
> Applied in 1064417
> 
>> "High ASCII" characters on PUT'ed URL causes db to misbehave
>> ------------------------------------------------------------
>> 
>>                Key: COUCHDB-1039
>>                URL: https://issues.apache.org/jira/browse/COUCHDB-1039
>>            Project: CouchDB
>>         Issue Type: Bug
>>   Affects Versions: 1.0.1, 1.2
>>           Reporter: Thiago Arrais
>>           Priority: Blocker
>>            Fix For: 1.2
>> 
>>        Attachments: badtext.tar.gz, validate_utf8_docid.patch
>> 
>> 
>> I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.
>> Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 

[jira] Resolved: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

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

Paul Joseph Davis resolved COUCHDB-1039.
----------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.1)
                   1.2

Applied in 1064417

> "High ASCII" characters on PUT'ed URL causes db to misbehave
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1039
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1039
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0.1, 1.2
>            Reporter: Thiago Arrais
>            Priority: Blocker
>             Fix For: 1.2
>
>         Attachments: badtext.tar.gz, validate_utf8_docid.patch
>
>
> I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.
> Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)

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


[jira] Commented: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

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

Thiago Arrais commented on COUCHDB-1039:
----------------------------------------

Patch verified and works. Thanks, Paul!

> "High ASCII" characters on PUT'ed URL causes db to misbehave
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1039
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1039
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0.1, 1.2
>            Reporter: Thiago Arrais
>         Attachments: badtext.tar.gz, validate_utf8_docid.patch
>
>
> I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.
> Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)

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


[jira] Updated: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

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

Jan Lehnardt updated COUCHDB-1039:
----------------------------------

         Priority: Blocker  (was: Major)
    Fix Version/s: 1.1

> "High ASCII" characters on PUT'ed URL causes db to misbehave
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1039
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1039
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0.1, 1.2
>            Reporter: Thiago Arrais
>            Priority: Blocker
>             Fix For: 1.1
>
>         Attachments: badtext.tar.gz, validate_utf8_docid.patch
>
>
> I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.
> Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)

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


[jira] Updated: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave

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

Thiago Arrais updated COUCHDB-1039:
-----------------------------------

    Attachment: badtext.tar.gz

I've modified this script from COUCHDB-345 that demonstrates the issue.

> "High ASCII" characters on PUT'ed URL causes db to misbehave
> ------------------------------------------------------------
>
>                 Key: COUCHDB-1039
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1039
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 1.0.1, 1.2
>            Reporter: Thiago Arrais
>         Attachments: badtext.tar.gz
>
>
> I've tried to PUT a doc to an id containing "high ascii" characters and couchdb (correctly, I imagine) refuses to save it and responds with an error. But any subsequent queries to the db special _all_docs document returns a double response (200 and 500) (much like COUCHDB-48) with a bad_utf8_character_code error.
> Tested on both 1.0.1 (from the Ubuntu Maverick repos) and svn (1.2.0a106148)

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