forked from pool/python-Twisted
* twisted.trial.successResultOf, twisted.trial.failureResultOf, and twisted.trial.assertNoResult accept coroutines as well as Deferreds. (#9006) * Fixed circular import in twisted.trial.reporter, introduced in Twisted 16.0.0. (#8267) * The POP3 server implemented by twisted.mail.pop3 now accepts passwords that contain spaces. (#9100) * Incoming HTTP/2 connections will now not time out if they persist for longer than one minute. (#9653) * twisted.conch.ssh.keys now correctly writes the "iqmp" parameter in serialized RSA private keys as q^-1 mod p rather than p^-1 mod q. (#9681) * twisted.web.server.Request will now use twisted.web.server.Site.getContentFile, if it exists, to get a file into which to write request content. If getContentFile is not provided by the site, it will fall back to the previous behavior of using io.BytesIO for small requests and tempfile.TemporaryFile for large ones. (#9655) * twisted.web.client.FileBodyProducer will now stop producing when the Deferred returned by FileBodyProducer.startProducing is cancelled. (#9547) * The HTTP/2 server implementation now enforces TCP flow control on control frame messages and times out clients that send invalid data without reading responses. This closes CVE-2019-9512 (Ping Flood), CVE-2019-9514 (Reset Flood), and CVE-2019-9515 (Settings Flood). Thanks to Jonathan Looney and Piotr Sikora. (#9694) - Add python-38-xml-namespace.patch to fix dictionary mutation under Python 3.8 - Add python-38-hmac-digestmod.patch to add digestmod parameter where required - Add python-38-no-cgi-parseqs.patch to no longer import parse_qs from cgi OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Twisted?expand=0&rev=85
42 lines
1.4 KiB
Diff
42 lines
1.4 KiB
Diff
Index: Twisted-19.10.0/src/twisted/web/test/test_http.py
|
|
===================================================================
|
|
--- Twisted-19.10.0.orig/src/twisted/web/test/test_http.py
|
|
+++ Twisted-19.10.0/src/twisted/web/test/test_http.py
|
|
@@ -9,15 +9,14 @@ from __future__ import absolute_import,
|
|
|
|
import base64
|
|
import calendar
|
|
-import cgi
|
|
import random
|
|
|
|
import hamcrest
|
|
|
|
try:
|
|
- from urlparse import urlparse, urlunsplit, clear_cache
|
|
+ from urlparse import urlparse, urlunsplit, clear_cache, parse_qs
|
|
except ImportError:
|
|
- from urllib.parse import urlparse, urlunsplit, clear_cache
|
|
+ from urllib.parse import urlparse, urlunsplit, clear_cache, parse_qs
|
|
|
|
from io import BytesIO
|
|
from itertools import cycle
|
|
@@ -2156,15 +2155,15 @@ Hello,
|
|
class QueryArgumentsTests(unittest.TestCase):
|
|
def testParseqs(self):
|
|
self.assertEqual(
|
|
- cgi.parse_qs(b"a=b&d=c;+=f"),
|
|
+ parse_qs(b"a=b&d=c;+=f"),
|
|
http.parse_qs(b"a=b&d=c;+=f"))
|
|
self.assertRaises(
|
|
ValueError, http.parse_qs, b"blah", strict_parsing=True)
|
|
self.assertEqual(
|
|
- cgi.parse_qs(b"a=&b=c", keep_blank_values=1),
|
|
+ parse_qs(b"a=&b=c", keep_blank_values=1),
|
|
http.parse_qs(b"a=&b=c", keep_blank_values=1))
|
|
self.assertEqual(
|
|
- cgi.parse_qs(b"a=&b=c"),
|
|
+ parse_qs(b"a=&b=c"),
|
|
http.parse_qs(b"a=&b=c"))
|
|
|
|
|