couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Shorin (JIRA)" <>
Subject [jira] [Created] (COUCHDB-1494) %00 document _id.
Date Thu, 07 Jun 2012 23:17:23 GMT
Alexander Shorin created COUCHDB-1494:

             Summary: %00 document _id.
                 Key: COUCHDB-1494
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core
    Affects Versions: 1.3
            Reporter: Alexander Shorin

There is possible to create document with null byte _id:

curl -X PUT http://localhost:5984/invis/%00 -H "Content-Type: application/json" -d '{"I am":"invincible

Every thing is ok with such document: you could access to him by %00 name, process him in
views and ever replicate without problem.

Fun begins when such document receives first update:

curl -X PUT http://localhost:5984/invis/%00 -H "Content-Type: application/json" -d '{"I am":"invincible
man!", "_rev": "1-41c7e2af5d2154c4f33de3f76451417e"}'

Now replicator tells that he done his job right:

"start_time":"Thu, 07 Jun 2012 23:01:30 GMT",
"end_time":"Thu, 07 Jun 2012 23:01:30 GMT",

But actually he didn't:

curl -X GET http://localhost:5984/invis2/_all_docs

And document does not ever exists:

curl -X GET http://localhost:5984/invis2/%00

Attempt to recreate him now fails with weird explanation:

curl -X PUT http://localhost:5984/invis2/%00 -H "Content-Type: application/json" -d '{"foo":"bar"}'
{"error":"forbidden","reason":"The `source' property must exist and be either a string or
an object."}

This issue is similar to COUCHDB-1493, but mostly focused on invalid doc _id case and related

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message