|
|
@ -153,8 +153,8 @@ def backup_download(filename):
|
|
|
|
def swaggerui_static(filename):
|
|
|
|
def swaggerui_static(filename):
|
|
|
|
basepath = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'libs', 'flask_restx',
|
|
|
|
basepath = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'libs', 'flask_restx',
|
|
|
|
'static')
|
|
|
|
'static')
|
|
|
|
fullpath = os.path.join(basepath, filename)
|
|
|
|
fullpath = os.path.realpath(os.path.join(basepath, filename))
|
|
|
|
if not fullpath.startswith(basepath):
|
|
|
|
if not basepath == os.path.commonpath((basepath, fullpath)):
|
|
|
|
return '', 404
|
|
|
|
return '', 404
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
return send_file(fullpath)
|
|
|
|
return send_file(fullpath)
|
|
|
|