couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Newson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-1721) attachment length is "undefined" in validate_doc_update but updates before first get
Date Sun, 24 Mar 2013 16:07:15 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-1721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13612132#comment-13612132
] 

Robert Newson commented on COUCHDB-1721:
----------------------------------------

Unfortunately validate_doc_update functions are called before the attachments are processed,
we don't know how big they will be. Not sure this is fixable but will leave it open for others
to comment.

                
> attachment length is "undefined" in validate_doc_update but updates before first get
> ------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-1721
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1721
>             Project: CouchDB
>          Issue Type: Bug
>            Reporter: Quentin Raynaud
>
> I wanted to create a specific validate_doc_update preventing to add attachments bigger
than a certain size to a document (to defeat possible abuses from users).
> The problem is: when I upload a document, if I log the value of newDoc._attachments.<filename>.length
it reports "undefined".
> I believe this is a "bug" since if I use GET on the document just after it is updated
with the attachment the length & digest are there. The validate_doc_update should always
process the same data that will be served by CouchDB if it does not deny the update.
> NB: I uploaded the attachments using the Futon interface during my tests on the subject

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

Mime
View raw message