fix: 解决越权下载文件的问题 (#1813)

This commit is contained in:
ssongliu
2023-08-02 22:36:37 +08:00
committed by GitHub
parent 202a2ad7ae
commit f6b84d384e
15 changed files with 111 additions and 198 deletions

View File

@@ -5093,48 +5093,6 @@ const docTemplate = `{
}
}
},
"/files/download/bypath": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "下载指定文件",
"consumes": [
"application/json"
],
"tags": [
"File"
],
"summary": "Download file with path",
"parameters": [
{
"description": "request",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.FilePath"
}
}
],
"responses": {
"200": {
"description": "OK"
}
},
"x-panel-log": {
"BeforeFuntions": [],
"bodyKeys": [
"path"
],
"formatEN": "Download file [path]",
"formatZH": "下载文件 [path]",
"paramKeys": []
}
}
},
"/files/mode": {
"post": {
"security": [
@@ -8823,6 +8781,25 @@ const docTemplate = `{
}
}
},
"/settings/ssl/download": {
"post": {
"security": [
{
"ApiKeyAuth": []
}
],
"description": "下载证书",
"tags": [
"System Setting"
],
"summary": "Download system cert",
"responses": {
"200": {
"description": "OK"
}
}
}
},
"/settings/ssl/info": {
"get": {
"security": [
@@ -12520,17 +12497,6 @@ const docTemplate = `{
}
}
},
"dto.FilePath": {
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "string"
}
}
},
"dto.FirewallBaseInfo": {
"type": "object",
"properties": {