couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Quentin Raynaud (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1722) Add a way to get the document size in validate_doc_update
Date Sun, 24 Mar 2013 18:05:15 GMT


Quentin Raynaud commented on COUCHDB-1722:

That's right... I thought that a way to have a similar result on a finer grain was a good
idea though. Thanks a lot for your time & suggestions though. I will at least make use
of max_document_size for sure. 4GB sure is a lot.
> Add a way to get the document size in validate_doc_update
> ---------------------------------------------------------
>                 Key: COUCHDB-1722
>                 URL:
>             Project: CouchDB
>          Issue Type: Improvement
>            Reporter: Quentin Raynaud
> It would be cool to add a way to know what is the current document size in validate_doc_update,
maybe by invoking a specific function provided by CouchDB like "documentLength(document)"
on it. The function could also take a boolean as a second argument to include the document's
attachments length or not in the count.
> That would allow to prevent document creation/update if the document looks too big for
its indented purpose. I would like such a possibility to defeat users that try to flood the
database in CouchApps or other applications allowing such a direct access to CouchDB.
> I don't like the idea that right now, a smart user that finds an application with an
API allowing direct access to a CouchDB can easily create some code to use your database as
as extra hard drive for whatever he wants (at least I believe I could do that with some efforts
by simply uploading my files to a random doc that I have write access to and by adding an
index to reference them. This can be done by adding a new attribute to the doc if the validation
is not too strict or by recycling an already existing attribute to such an effect or even
by uploading the index in a specific file too).

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:

View raw message