fix: 解决打开越权读取文件的问题 (#1810)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Package docs GENERATED BY SWAG; DO NOT EDIT
|
||||
// This file was generated by swaggo/swag
|
||||
// Code generated by swaggo/swag. DO NOT EDIT.
|
||||
|
||||
package docs
|
||||
|
||||
import "github.com/swaggo/swag"
|
||||
@@ -2005,6 +2005,39 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/containers/load/log": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "获取容器操作日志",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Container"
|
||||
],
|
||||
"summary": "Load container log",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.OperationWithNameAndType"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/containers/network": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -3058,6 +3091,39 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/cronjob/record/log": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "获取计划任务记录日志",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Cronjob"
|
||||
],
|
||||
"summary": "Load Cronjob record log",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.OperateByID"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/cronjobs": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -3925,6 +3991,39 @@ const docTemplate = `{
|
||||
"responses": {}
|
||||
}
|
||||
},
|
||||
"/databases/load/file": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "获取数据库文件",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Database"
|
||||
],
|
||||
"summary": "Load Database file",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.OperationWithNameAndType"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/databases/options": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -5036,42 +5135,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/files/loadfile": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "读取文件",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"File"
|
||||
],
|
||||
"summary": "Read file",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.FilePath"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/files/mode": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -5748,6 +5811,25 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/host/ssh/conf": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "获取 ssh 配置文件",
|
||||
"tags": [
|
||||
"SSH"
|
||||
],
|
||||
"summary": "Load host ssh conf",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/host/ssh/generate": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -6251,7 +6333,7 @@ const docTemplate = `{
|
||||
"bodyKeys": [
|
||||
"operate"
|
||||
],
|
||||
"formatEN": "[operate] [operate] Supervisor 进程文件",
|
||||
"formatEN": "[operate] Supervisor Process Config file",
|
||||
"formatZH": "[operate] Supervisor 进程文件 ",
|
||||
"paramKeys": []
|
||||
}
|
||||
@@ -7188,6 +7270,25 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/logs/system": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"ApiKeyAuth": []
|
||||
}
|
||||
],
|
||||
"description": "获取系统日志",
|
||||
"tags": [
|
||||
"Logs"
|
||||
],
|
||||
"summary": "Load system logs",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/openResty": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -13291,6 +13392,21 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.OperationWithNameAndType": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.Options": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -15773,7 +15889,8 @@ const docTemplate = `{
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"out.log",
|
||||
"err.log"
|
||||
"err.log",
|
||||
"config"
|
||||
]
|
||||
},
|
||||
"name": {
|
||||
|
Reference in New Issue
Block a user