[tahoe-lafs-trac-stream] [Tahoe-LAFS] #3908: Detect invalid HTTP storage server responses early, close request

Tahoe-LAFS trac at tahoe-lafs.org
Fri Jul 15 14:33:50 UTC 2022


#3908: Detect invalid HTTP storage server responses early, close request
-----------------------------+-----------------------------------
     Reporter:  itamarst     |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  normal       |  Milestone:  HTTP Storage Protocol
    Component:  unknown      |    Version:  n/a
   Resolution:               |   Keywords:
Launchpad Bug:               |
-----------------------------+-----------------------------------
Description changed by itamarst:

Old description:

> When downloading shares, if the Content-Length/Content-Range of a
> response doesn't match requested body length (too short means we were
> wrong about what server has in terms of length, or server bug, too long
> means server bug), we should probably just give up early.
>
> This depends on #3907; currently we knowingly send non-matching lengths,
> so that needs to be fixed first.
>
> Implementation: when deliverBody() happens the passed-in protocol gets
> access to the transport, allowing us to close the connection.

New description:

 When downloading shares, if the Content-Length/Content-Range of a response
 doesn't match requested body length (too short means we were wrong about
 what server has in terms of length, or server bug, too long means server
 bug), we should probably just give up early.

 This depends on #3907; currently we knowingly send non-matching lengths,
 so that needs to be fixed first.

 It also depends on https://github.com/twisted/treq/issues/347 to make this
 possible at all.

 Implementation: when deliverBody() happens the passed-in protocol gets
 access to the transport, allowing us to close the connection.

--

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3908#comment:1>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list