Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0840b415
Commit
0840b415
authored
Sep 17, 2014
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #22421 - Secure pydoc server run. Bind it to localhost instead of all interfaces.
parent
dad182c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
Lib/pydoc.py
Lib/pydoc.py
+2
-2
Lib/test/test_pydoc.py
Lib/test/test_pydoc.py
+2
-0
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/pydoc.py
View file @
0840b415
...
...
@@ -2431,8 +2431,8 @@ def _start_server(urlhandler, port):
class
DocServer
(
http
.
server
.
HTTPServer
):
def
__init__
(
self
,
port
,
callback
):
self
.
host
=
(
sys
.
platform
==
'mac'
)
and
'127.0.0.1'
or
'localhost'
self
.
address
=
(
''
,
port
)
self
.
host
=
'localhost'
self
.
address
=
(
self
.
host
,
port
)
self
.
callback
=
callback
self
.
base
.
__init__
(
self
,
self
.
address
,
self
.
handler
)
self
.
quit
=
False
...
...
Lib/test/test_pydoc.py
View file @
0840b415
...
...
@@ -510,6 +510,8 @@ class PydocServerTest(unittest.TestCase):
return
text
serverthread
=
pydoc
.
_start_server
(
my_url_handler
,
port
=
0
)
self
.
assertIn
(
'localhost'
,
serverthread
.
docserver
.
address
)
starttime
=
time
.
time
()
timeout
=
1
#seconds
...
...
Misc/NEWS
View file @
0840b415
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.2.6?
Library
-------
- Issue #22421: Fix a regression that caused the pydoc server to be bound to
all interfaces instead of only localhost.
- Issue #22419: Limit the length of incoming HTTP request in wsgiref server to
65536 bytes and send a 414 error code for higher lengths. Patch contributed
by Devin Cook.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment