couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Joseph Davis (JIRA)" <>
Subject [jira] Updated: (COUCHDB-1039) "High ASCII" characters on PUT'ed URL causes db to misbehave
Date Fri, 21 Jan 2011 19:05:46 GMT


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

View raw message