You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/04/03 10:51:52 UTC

[GitHub] [couchdb] rnewson commented on a change in pull request #1997: Fix #1988 - Validate attachment names at POST /db/doc and GET /db/doc/attachment

rnewson commented on a change in pull request #1997: Fix #1988 - Validate attachment names at POST /db/doc and GET /db/doc/attachment
URL: https://github.com/apache/couchdb/pull/1997#discussion_r402922015
 
 

 ##########
 File path: src/chttpd/src/chttpd_db.erl
 ##########
 @@ -1432,6 +1433,7 @@ couch_doc_open(Db, DocId, Rev, Options0) ->
 db_attachment_req(#httpd{method='GET',mochi_req=MochiReq}=Req, Db, DocId, FileNameParts) ->
     FileName = list_to_binary(mochiweb_util:join(lists:map(fun binary_to_list/1,
         FileNameParts),"/")),
+    validate_attachment_name(FileName),
 
 Review comment:
   why validate on GET?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services