mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 07:11:13 +02:00
Keep consistance of aiohttp.web.HTTPForbidden() execution
This commit is contained in:
1 parent
efbf7728ea
commit
fe60c414b9
5 files changed
+9
-10
No files matched your search
@@ -407,6 +407,6 @@ class IOUHandler:
|
||||
|
||||
# Raise error if user try to escape
|
||||
if filename[0] == ".":
|
||||
raise aiohttp.web.HTTPForbidden
|
||||
raise aiohttp.web.HTTPForbidden()
|
||||
|
||||
yield from response.file(image_path)
|
||||
@@ -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)
|
||||
|
||||
@@ -498,6 +498,6 @@ class QEMUHandler:
|
||||
|
||||
# Raise error if user try to escape
|
||||
if filename[0] == ".":
|
||||
raise aiohttp.web.HTTPForbidden
|
||||
raise aiohttp.web.HTTPForbidden()
|
||||
|
||||
yield from response.file(image_path)
|
||||
Reference in new issue
Block a user