cpython: 5d8042ab3361 (original) (raw)

Mercurial > cpython

changeset 101046:5d8042ab3361

Issue #26657: Merge http.server fix from 3.5 [#26657]

Martin Panter vadmium+py@gmail.com
date Mon, 18 Apr 2016 07:16:17 +0000
parents 7d9f7d7a21ae(current diff)8054a68dfce2(diff)
children 43567d214534
files Lib/http/server.py Lib/test/test_httpservers.py Misc/NEWS
diffstat 3 files changed, 26 insertions(+), 3 deletions(-)[+] [-] Lib/http/server.py 6 Lib/test/test_httpservers.py 19 Misc/NEWS 4

line wrap: on

line diff

--- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -768,9 +768,9 @@ class SimpleHTTPRequestHandler(BaseHTTPR words = filter(None, words) path = os.getcwd() for word in words:

--- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -12,6 +12,7 @@ import os import sys import re import base64 +import ntpath import shutil import urllib.parse import html @@ -960,6 +961,24 @@ class SimpleHTTPRequestHandlerTestCase(u path = self.handler.translate_path('//filename?foo=bar') self.assertEqual(path, self.translated)

+

+

+

+ class MiscTestCase(unittest.TestCase): def test_all(self):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -245,6 +245,10 @@ Core and Builtins Library ------- +- Issue #26657: Fix directory traversal vulnerability with http.server on