Ticket #4143 defect closed fixed

Opened 3 years ago

Last modified 3 years ago

twisted.web.wsgi incorrectly unquotes QUERY_STRING

Reported by: therve Owned by:
Priority: normal Milestone: Twisted-10.0
Component: web Keywords:
Cc: Branch: branches/wsgi-query-string-4143
Author: therve Launchpad Bug:

Description

In _WSGIResponse.__init__, the data put in the QUERY_STRING env value is passed through urllib.unquote. Although the WSIG spec is unclear about it, it looks like the query string should be passed unchanged, and lets the application deals with it.

Change History

1

Changed 3 years ago by therve

  • branch set to branches/wsgi-query-string-4143
  • branch_author set to therve

(In [28255]) Branching to 'wsgi-query-string-4143'

2

Changed 3 years ago by therve

  • keywords review added
  • owner therve deleted

This is ready to review in the attached branch.

3

Changed 3 years ago by spiv

  • owner set to therve
  • keywords review removed

A quick skim of wsgiref suggests you're right that it should be unquoted. In that case, this change looks good to me. So, assuming the rest of the test suite passes, all that is missing is a news file. With a news file this will be good to merge.

4

Changed 3 years ago by therve

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

(In [28295]) Merge wsgi-query-string-4143

Author: therve Reviewer: spiv Fixes: #4143

Remove the call to unquote on QUERY_STRING in twisted.web.wsgi, to pass the string unchanged to the application layer. It seems to be the expected behavior of WSGI containers.

5

Changed 2 years ago by <automation>

  • owner therve deleted
Note: See TracTickets for help on using tickets.