This commit is contained in:
Tim Bentley 2015-11-08 21:19:54 +00:00
parent 97e3eea173
commit ae21d548ba
1 changed files with 2 additions and 2 deletions

View File

@ -353,10 +353,10 @@ class HttpRouter(RegistryProperties):
log.debug('serve file request %s' % file_name) log.debug('serve file request %s' % file_name)
parts = file_name.split('/') parts = file_name.split('/')
if len(parts) == 1: if len(parts) == 1:
file_name = parts[0] + '/stage.html' file_name = os.path.join(parts[0], 'stage.html')
elif len(parts) == 3: elif len(parts) == 3:
print(parts) print(parts)
file_name = parts[1] + '/' + parts[2] file_name = os.path.join(parts[1], parts[2])
path = os.path.normpath(os.path.join(self.config_dir, file_name)) path = os.path.normpath(os.path.join(self.config_dir, file_name))
if not path.startswith(self.config_dir): if not path.startswith(self.config_dir):
return self.do_not_found() return self.do_not_found()