mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-17 14:58:13 +00:00
Keep consistance of aiohttp.web.HTTPForbidden() execution
This commit is contained in:
@ -398,7 +398,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"
|
||||
@ -440,7 +440,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)
|
||||
|
Reference in New Issue
Block a user