? pydoc_security_patch.diff ? dist/src/Mac/IDE scripts/Hold option to open a script ? dist/src/Mac/IDE scripts/Insert file name ? dist/src/Mac/IDE scripts/Insert folder name ? dist/src/Mac/IDE scripts/Search Python Documentation ? dist/src/Mac/IDE scripts/Hack/Remove .pyc files ? dist/src/Mac/IDE scripts/Hack/Toolbox Assistant Index: dist/src/Lib/pydoc.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v retrieving revision 1.74 diff -c -c -r1.74 pydoc.py *** dist/src/Lib/pydoc.py 28 Dec 2002 09:23:08 -0000 1.74 --- dist/src/Lib/pydoc.py 18 Jan 2003 18:41:04 -0000 *************** *** 1827,1832 **** --- 1827,1837 ---- self.address = ('', port) self.url = 'http://%s:%d/' % (host, port) self.callback = callback + # for security, by default, limit connections to machine + # the server is running on + import socket + self.validIPList = ['127.0.0.1'] + self.validIPList.append(socket.gethostbyname(socket.gethostname())) self.base.__init__(self, self.address, self.handler) def serve_until_quit(self): *************** *** 1839,1844 **** --- 1844,1855 ---- def server_activate(self): self.base.server_activate(self) if self.callback: self.callback(self) + + def verify_request(self, request, client_address): + if client_address[0] in self.validIPList: + return 1 + else: + return 0 DocServer.base = BaseHTTPServer.HTTPServer DocServer.handler = DocHandler