-
c866c59b :Anonymous
2015-11-20 14:14
-
>>95aaa9f1
in server_cgi.py
def get_remote_hostname(self, host):
remote_addr = self.environ['REMOTE_ADDR']
if host == '':
return remote_addr
ipaddr = socket.gethostbyname(host)
if ipaddr == remote_addr:
return host
return None
def do_update(self, path_info):
self.header("text/plain")
m = re.search(r"^update/(\w+)/(\d+)/(\w+)/([^:]*):(\d+)(.*)",path_info)
if m is None:
return False
(datfile, stamp, id, host, port, path) = m.groups()
if not title.is_valid_file(datfile, 'thread'):
return False
host = self.get_remote_hostname(host)
if not host:
return False
<後略>
Powered by shinGETsu.