Keep consistance of aiohttp.web.HTTPForbidden() execution

This commit is contained in:
ziajka
2017-11-23 16:28:10 +01:00
parent efbf7728ea
commit fe60c414b9
5 changed files with 9 additions and 10 deletions

View File

@ -231,7 +231,7 @@ class ProjectHandler:
# Raise error if user try to escape
if path[0] == ".":
raise aiohttp.web.HTTPForbidden
raise aiohttp.web.HTTPForbidden()
path = os.path.join(project.path, path)
response.content_type = "application/octet-stream"
@ -272,7 +272,7 @@ class ProjectHandler:
# Raise an error if user try to escape
if path[0] == ".":
raise aiohttp.web.HTTPForbidden
raise aiohttp.web.HTTPForbidden()
path = os.path.join(project.path, path)
response.content_type = "application/octet-stream"
@ -314,7 +314,7 @@ class ProjectHandler:
# Raise error if user try to escape
if path[0] == ".":
raise aiohttp.web.HTTPForbidden
raise aiohttp.web.HTTPForbidden()
path = os.path.join(project.path, path)
response.set_status(200)