Ticket #6031 enhancement closed fixed

Opened 8 months ago

Last modified 7 months ago

Move the request encoder API to Resource

Reported by: therve Owned by: therve
Priority: normal Milestone: Twisted-12.3
Component: web Keywords:
Cc: jknight Branch: branches/encoder-resource-6031-2
Author: therve Launchpad Bug:

Description

The new API merged at #104 is on Site, but it doesn't allow to selectively enable encoders on specific path. It's particularly important given the SSL/Zlib attacks on user-generated requests (see  https://bugzilla.redhat.com/show_bug.cgi?id=857051 for example).

Change History

1

Changed 8 months ago by DefaultCC Plugin

  • cc jknight added

2

Changed 8 months ago by therve

  • branch set to branches/encoder-resource-6031
  • branch_author set to therve

(In [35846]) Branching to 'encoder-resource-6031'

3

Changed 8 months ago by therve

  • owner therve deleted
  • keywords review added

Here it is!

4

Changed 7 months ago by therve

  • branch changed from branches/encoder-resource-6031 to branches/encoder-resource-6031-2

(In [36174]) Branching to 'encoder-resource-6031-2'

5

Changed 7 months ago by exarkun

  • keywords review removed
  • owner set to therve

Thanks. Just some minor doc issues:

  1. Seems like EncodingResourceWrapper shouldn't bother talking about the private interface that is used to implement the behavior it provides (since we don't want to encourage users to do anything with this interface).
  2. Would also be nice to see EncodingResourceWrapper be a little more explicit about what it does: (potentially) apply one of the encodings to the response body generated by the wrapped resource. Perhaps also worth mentioning encodings are not inherited by children of the resource.
  3. in the Resource docstring, instead of "It serves 2 main purposes..." I would write "This serves 2 main purposes...".

That's all. Please fix these and then merge (if the  build results look good), thanks!

6

Changed 7 months ago by therve

  • status changed from new to closed
  • resolution set to fixed

(In [36181]) Merge encoder-resource-6031-2

Author: therve Reviewer: exarkun Fixes: #6031

Move the encoding mechanism logic in twisted.web from Site to a wrapper Resource, so that users can more selectively apply it. In particular, add a note in the documentation about SSL/zlib attacks on user-generated content.

Note: See TracTickets for help on using tickets.