bpo-30458: Disallow control chars in http URLs. by gpshead · Pull Request #12755 · python/cpython (original) (raw)

From https://github.com/python/cpython

The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, functio n, script file, or operable program. Check the spelling of the name, or if a pa th was included, verify that the path is correct and try again. At line:1 char:18

'py' is not recognized as an internal or external command, operable program or batch file. '"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\PCbuild\..\externals\nuget.exe"' is not recognized as an internal or external command, operable program or batch file. The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, functio n, script file, or operable program. Check the spelling of the name, or if a pa th was included, verify that the path is correct and try again. At line:1 char:18

'py' is not recognized as an internal or external command, operable program or batch file. '"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\PCbuild\..\externals\nuget.exe"' is not recognized as an internal or external command, operable program or batch file. Could Not Find D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\Lib*.pyc The system cannot find the file specified. Could Not Find D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\PCbuild\python*.zip The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, functio n, script file, or operable program. Check the spelling of the name, or if a pa th was included, verify that the path is correct and try again. At line:1 char:18

'py' is not recognized as an internal or external command, operable program or batch file. '"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\PCbuild\..\externals\nuget.exe"' is not recognized as an internal or external command, operable program or batch file.

test_dbm_gnu skipped -- No module named '_gdbm' test_grp skipped -- No module named 'grp' skipped 'test requires 2500000000 bytes and a long time to run'


Ran 0 tests in 0.000s

OK (skipped=1) test_bad_status_repr (test.test_httplib.BasicTest) ... ok test_chunked (test.test_httplib.BasicTest) ... ok test_chunked_extension (test.test_httplib.BasicTest) ... ok test_chunked_head (test.test_httplib.BasicTest) ... ok test_chunked_missing_end (test.test_httplib.BasicTest) some servers may serve up a short chunked encoding stream ... ok test_chunked_sync (test.test_httplib.BasicTest) Check that we don't read past the end of the chunked-encoding stream ... ok test_chunked_trailers (test.test_httplib.BasicTest) See that trailers are read and ignored ... ok test_content_length_sync (test.test_httplib.BasicTest) Check that we don't read past the end of the Content-Length stream ... ok test_early_eof (test.test_httplib.BasicTest) ... ok test_epipe (test.test_httplib.BasicTest) ... ok test_error_leak (test.test_httplib.BasicTest) ... ok test_host_port (test.test_httplib.BasicTest) ... ok test_incomplete_read (test.test_httplib.BasicTest) ... ok test_mixed_reads (test.test_httplib.BasicTest) ... ok test_negative_content_length (test.test_httplib.BasicTest) ... ok test_overflowing_chunked_line (test.test_httplib.BasicTest) ... ok test_overflowing_header_line (test.test_httplib.BasicTest) ... ok test_overflowing_status_line (test.test_httplib.BasicTest) ... ok test_partial_readintos (test.test_httplib.BasicTest) ... ok test_partial_readintos_incomplete_body (test.test_httplib.BasicTest) ... ok test_partial_readintos_no_content_length (test.test_httplib.BasicTest) ... ok test_partial_reads (test.test_httplib.BasicTest) ... ok test_partial_reads_incomplete_body (test.test_httplib.BasicTest) ... ok test_partial_reads_no_content_length (test.test_httplib.BasicTest) ... ok test_read1_bound_content_length (test.test_httplib.BasicTest) ... ok test_read1_content_length (test.test_httplib.BasicTest) ... ok test_read_head (test.test_httplib.BasicTest) ... ok test_readinto_chunked (test.test_httplib.BasicTest) ... ok test_readinto_chunked_head (test.test_httplib.BasicTest) ... ok test_readinto_head (test.test_httplib.BasicTest) ... ok test_readline_bound_content_length (test.test_httplib.BasicTest) ... ok test_readlines_content_length (test.test_httplib.BasicTest) ... ok test_response_fileno (test.test_httplib.BasicTest) ... ok test_response_headers (test.test_httplib.BasicTest) ... ok test_send (test.test_httplib.BasicTest) ... ok test_send_file (test.test_httplib.BasicTest) ... ok test_send_iter (test.test_httplib.BasicTest) ... ok test_send_type_error (test.test_httplib.BasicTest) ... ok test_send_updating_file (test.test_httplib.BasicTest) ... ok test_status_lines (test.test_httplib.BasicTest) ... ok test_too_many_headers (test.test_httplib.BasicTest) ... ok test_peek (test.test_httplib.ExtendedReadTest) ... ok test_peek_0 (test.test_httplib.ExtendedReadTest) ... ok test_read1 (test.test_httplib.ExtendedReadTest) ... ok test_read1_0 (test.test_httplib.ExtendedReadTest) ... ok test_read1_bounded (test.test_httplib.ExtendedReadTest) ... ok test_read1_unbounded (test.test_httplib.ExtendedReadTest) ... ok test_readline (test.test_httplib.ExtendedReadTest) ... ok test_peek (test.test_httplib.ExtendedReadTestChunked) ... ok test_peek_0 (test.test_httplib.ExtendedReadTestChunked) ... ok test_read1 (test.test_httplib.ExtendedReadTestChunked) ... ok test_read1_0 (test.test_httplib.ExtendedReadTestChunked) ... ok test_read1_bounded (test.test_httplib.ExtendedReadTestChunked) ... ok test_read1_unbounded (test.test_httplib.ExtendedReadTestChunked) ... ok test_readline (test.test_httplib.ExtendedReadTestChunked) ... ok test_getting_header (test.test_httplib.HTTPResponseTest) ... ok test_getting_header_defaultint (test.test_httplib.HTTPResponseTest) ... ok test_getting_nonexistent_header_with_iterable_default (test.test_httplib.HTTPResponseTest) ... ok test_getting_nonexistent_header_with_string_default (test.test_httplib.HTTPResponseTest) ... ok test_getting_nonexistent_header_without_default (test.test_httplib.HTTPResponseTest) ... ok test_attributes (test.test_httplib.HTTPSTest) ... ok test_host_port (test.test_httplib.HTTPSTest) ... ok test_local_bad_hostname (test.test_httplib.HTTPSTest) ... server (('127.0.0.1', 56004):56004 ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)): [08/May/2019 13:43:41] code 404, message File not found server (('127.0.0.1', 56004):56004 ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)): [08/May/2019 13:43:41] "GET /nonexistent HTTP/1.1" 404 - server (('127.0.0.1', 56004):56004 ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)): [08/May/2019 13:43:43] code 404, message File not found server (('127.0.0.1', 56004):56004 ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)): [08/May/2019 13:43:43] "GET /nonexistent HTTP/1.1" 404 - stopping HTTPS server joining HTTPS thread ok test_local_good_hostname (test.test_httplib.HTTPSTest) ... server (('127.0.0.1', 56019):56019 ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)): [08/May/2019 13:43:45] code 404, message File not found server (('127.0.0.1', 56019):56019 ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1/SSLv3', 256)): [08/May/2019 13:43:45] "GET /nonexistent HTTP/1.1" 404 - stopping HTTPS server joining HTTPS thread ok test_local_unknown_cert (test.test_httplib.HTTPSTest) ... stopping HTTPS server Got an error: [WinError 10054] An existing connection was forcibly closed by the remote host joining HTTPS thread ok test_networked (test.test_httplib.HTTPSTest) ... ok test_networked_bad_cert (test.test_httplib.HTTPSTest) ... ok test_networked_good_cert (test.test_httplib.HTTPSTest) ... ERROR test_networked_noverification (test.test_httplib.HTTPSTest) ... ok test_networked_trusted_by_default_cert (test.test_httplib.HTTPSTest) ... skipped 'system does not contain necessary certificates' test_auto_headers (test.test_httplib.HeaderTests) ... ok test_content_length_0 (test.test_httplib.HeaderTests) ... ok test_headers_debuglevel (test.test_httplib.HeaderTests) ... ok test_invalid_headers (test.test_httplib.HeaderTests) ... ok test_ipv6host_header (test.test_httplib.HeaderTests) ... ok test_malformed_headers_coped_with (test.test_httplib.HeaderTests) ... ok test_parse_all_octets (test.test_httplib.HeaderTests) ... ok test_putheader (test.test_httplib.HeaderTests) ... ok test_all (test.test_httplib.OfflineTest) ... ok test_client_constants (test.test_httplib.OfflineTest) ... ok test_responses (test.test_httplib.OfflineTest) ... ok test_100_close (test.test_httplib.PersistenceTest) ... ok test_disconnected (test.test_httplib.PersistenceTest) ... ok test_reuse_reconnect (test.test_httplib.PersistenceTest) ... ok test_ascii_body (test.test_httplib.RequestBodyTest) ... ok test_binary_file_body (test.test_httplib.RequestBodyTest) ... ok test_bytes_body (test.test_httplib.RequestBodyTest) ... ok test_latin1_body (test.test_httplib.RequestBodyTest) ... ok test_list_body (test.test_httplib.RequestBodyTest) ... ok test_manual_content_length (test.test_httplib.RequestBodyTest) ... ok test_text_file_body (test.test_httplib.RequestBodyTest) ... ok testHTTPConnectionSourceAddress (test.test_httplib.SourceAddressTest) ... ok testHTTPSConnectionSourceAddress (test.test_httplib.SourceAddressTest) ... ok testTimeoutAttribute (test.test_httplib.TimeoutTest) ... ok test_empty_body (test.test_httplib.TransferEncodingTest) ... ok test_endheaders_chunked (test.test_httplib.TransferEncodingTest) ... ok test_explicit_headers (test.test_httplib.TransferEncodingTest) ... ok test_request (test.test_httplib.TransferEncodingTest) ... ok test_connect_put_request (test.test_httplib.TunnelTests) ... ok test_connect_with_tunnel (test.test_httplib.TunnelTests) ... ok test_disallow_set_tunnel_after_connect (test.test_httplib.TunnelTests) ... ok test_set_tunnel_host_port_headers (test.test_httplib.TunnelTests) ... ok test_tunnel_debuglog (test.test_httplib.TunnelTests) ... ok

====================================================================== ERROR: test_networked_good_cert (test.test_httplib.HTTPSTest)

Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\test_httplib.py", line 1605, in test_networked_good_cert h.request('GET', '/') File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\http\client.py", line 1254, in request self._send_request(method, url, body, headers, encode_chunked) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\http\client.py", line 1300, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\http\client.py", line 1249, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\http\client.py", line 1036, in _send_output self.send(msg) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\http\client.py", line 974, in send self.connect() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\http\client.py", line 1415, in connect server_hostname=server_hostname) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\ssl.py", line 407, in wrap_socket _context=self, _session=session) File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\ssl.py", line 817, in init self.do_handshake() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\ssl.py", line 1077, in do_handshake self._sslobj.do_handshake() File "D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\ssl.py", line 689, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)


Ran 103 tests in 12.057s

FAILED (errors=1, skipped=1) test test_httplib failed test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run test_curses skipped -- No module named '_curses' test_devpoll skipped -- test works only on Solaris OS family test_multiprocessing_fork skipped -- fork is not available on Windows test_fcntl skipped -- No module named 'fcntl' test_threadsignals skipped -- Can't test signal on win32 test_pipes skipped -- pipes module only works on posix minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN) minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN) minkernel\crts\ucrt\src\appcrt\lowio\close.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN) test_fork1 skipped -- object <module 'os' from 'D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\os.py'> has no attribute 'fork' test_readline skipped -- No module named 'readline' test_syslog skipped -- No module named 'syslog' test_dbm_ndbm skipped -- No module named '_dbm' skipped 'dtrace(1) failed: [WinError 2] The system cannot find the file specified' skipped 'dtrace(1) failed: [WinError 2] The system cannot find the file specified' skipped 'stap(1) failed: [WinError 2] The system cannot find the file specified' skipped 'stap(1) failed: [WinError 2] The system cannot find the file specified'


Ran 0 tests in 0.070s

OK (skipped=4) test_ioctl skipped -- No module named 'fcntl' test_crypt skipped -- No module named '_crypt' test_wait4 skipped -- object <module 'os' from 'D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\os.py'> has no attribute 'fork' test_ossaudiodev skipped -- No module named 'ossaudiodev' test_openpty skipped -- os.openpty() not available. test_kqueue skipped -- test works only on BSD test_resource skipped -- No module named 'resource' test_nis skipped -- No module named 'nis' test_pty skipped -- No module named 'termios' test_pwd skipped -- No module named 'pwd' minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN) test_gdb skipped -- Couldn't find gdb on the path


Ran 0 tests in 0.000s

OK test_multiprocessing_forkserver skipped -- forkserver is not available on Windows test_posix skipped -- No module named 'posix' test_wait3 skipped -- os.fork not defined stty: standard input: Inappropriate ioctl for device D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\support_init_.py:1036: RuntimeWarning: tests may fail, unable to create temp dir: D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\build\test_python_1096 with temp_dir(path=name, quiet=quiet) as temp_path: test_poll skipped -- select.poll not defined test_spwd skipped -- No module named 'spwd' test_epoll skipped -- test works only on Linux 2.6 Got an error: [WinError 10054] An existing connection was forcibly closed by the remote host test test_httplib failed

The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, functio n, script file, or operable program. Check the spelling of the name, or if a pa th was included, verify that the path is correct and try again. At line:1 char:18

'py' is not recognized as an internal or external command, operable program or batch file. '"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\PCbuild\..\externals\nuget.exe"' is not recognized as an internal or external command, operable program or batch file. The term 'Invoke-WebRequest' is not recognized as the name of a cmdlet, functio n, script file, or operable program. Check the spelling of the name, or if a pa th was included, verify that the path is correct and try again. At line:1 char:18

'py' is not recognized as an internal or external command, operable program or batch file. '"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\PCbuild\..\externals\nuget.exe"' is not recognized as an internal or external command, operable program or batch file. Could Not Find D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\PCbuild\python*.zip