Merge lp:~cjwatson/launchpad/twisted-19.2.1 into lp:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 18981
Proposed branch: lp:~cjwatson/launchpad/twisted-19.2.1
Merge into: lp:launchpad
Diff against target: 84 lines (+12/-9)
2 files modified
constraints.txt (+5/-4)
lib/lp/testing/swift/fakeswift.py (+7/-5)
To merge this branch: bzr merge lp:~cjwatson/launchpad/twisted-19.2.1
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+368533@code.launchpad.net

Commit message

Upgrade to Twisted 19.2.1.

Description of the change

We can no longer play quite so fast and loose with the header values passed to twisted.web.http.Request.setHeader as we previously did.

I don't *think* we're affected by the security vulnerability fixed in this release, but better safe than sorry.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'constraints.txt'
2--- constraints.txt 2019-05-22 14:57:45 +0000
3+++ constraints.txt 2019-06-07 10:08:22 +0000
4@@ -221,7 +221,7 @@
5 anyjson==0.3.3
6 appdirs==1.4.3
7 asn1crypto==0.23.0
8-attrs==17.3.0
9+attrs==19.1.0
10 auditor==0.0.3
11 auditorclient==0.0.4
12 auditorfixture==0.0.7
13@@ -241,7 +241,7 @@
14 chardet==3.0.4
15 constantly==15.1.0
16 cookies==2.2.1
17-cryptography==2.1.4
18+cryptography==2.7
19 cssselect==0.9.1
20 cssutils==0.9.10
21 d2to1==0.2.12
22@@ -323,6 +323,7 @@
23 # lp:~launchpad/pygpgme/pthread
24 # lp1 Link against libgpgme-pthread for thread-safety.
25 pygpgme==0.3+lp1
26+PyHamcrest==1.9.0
27 pyinotify==0.9.4
28 pymacaroons==0.13.0
29 PyNaCl==1.3.0
30@@ -345,7 +346,7 @@
31 requests-toolbelt==0.6.2
32 responses==0.9.0
33 scandir==1.7
34-service-identity==17.0.0
35+service-identity==18.1.0
36 setproctitle==1.1.7
37 setuptools-git==1.2
38 setuptools-scm==1.15.7
39@@ -364,7 +365,7 @@
40 testscenarios==0.4
41 timeline==0.0.3
42 treq==18.6.0
43-Twisted[conch,tls]==18.4.0
44+Twisted[conch,tls]==19.2.1
45 txAMQP==0.6.2
46 txfixtures==0.4.2
47 txpkgupload==0.2
48
49=== modified file 'lib/lp/testing/swift/fakeswift.py'
50--- lib/lp/testing/swift/fakeswift.py 2017-12-19 15:16:18 +0000
51+++ lib/lp/testing/swift/fakeswift.py 2019-06-07 10:08:22 +0000
52@@ -245,17 +245,19 @@
53
54 def render_GET(self, request):
55 """Render the response for a GET or HEAD request on this object."""
56- request.setHeader("Content-Type", self.content_type)
57- request.setHeader("ETag", self._etag)
58+ if self.content_type is not None:
59+ request.setHeader("Content-Type", self.content_type)
60+ if self._etag is not None:
61+ request.setHeader("ETag", self._etag)
62 range = request.getHeader("Range")
63 size = len(self.contents)
64 if request.method == 'HEAD':
65- request.setHeader("Content-Length", size)
66+ request.setHeader("Content-Length", str(size))
67 return ""
68 if range:
69 ranges = parse_range_header(range)
70 length = 0
71- if len(ranges)==1:
72+ if len(ranges) == 1:
73 begin, end = ranges[0]
74 if begin is None:
75 request.setResponseCode(
76@@ -276,7 +278,7 @@
77 'content-range',
78 'bytes %d-%d/%d' % (begin, end-1, size))
79 length = (end - begin)
80- request.setHeader("Content-Length", length)
81+ request.setHeader("Content-Length", str(length))
82 request.setResponseCode(http.PARTIAL_CONTENT)
83 contents = io.BytesIO(self.contents[begin:end])
84 else: