Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
e3b5b378
authored
Apr 09, 2026
by
Archer
Committed by
GitHub
Apr 09, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: mcp auth (#6733)
* fix: mcp auth * doc * doc
parent
d2d48fc1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
24 deletions
+30
-24
SECURITY.md
+18
-19
document/content/docs/self-host/upgrading/4-14/41411.mdx
+2
-0
document/data/doc-last-modified.json
+1
-1
projects/app/src/pages/api/core/app/mcpTools/getChildren.ts
+3
-4
projects/app/src/pages/api/core/app/mcpTools/getTools.ts
+3
-0
projects/app/src/pages/api/core/app/mcpTools/runTool.ts
+3
-0
No files found.
SECURITY.md
View file @
e3b5b378
#
安全策略
#
Security Policy
##
漏洞报告
##
Vulnerability Reporting
如果您发现了 FastGPT 的安全漏洞,请按照以下步骤进行报告:
If you discover a security vulnerability in FastGPT, please follow the steps below to report it:
1.
**报告方式**
1.
**How to Report**
发送邮件至:archer@fastgpt.io
You can submit a report at https://github.com/labring/FastGPT/security/advisories.
请备注版本以及您的 GitHub 账号
3.
**响应时间
**
2.
**Response Time
**
-
我们会在 48 小时内确认收到您的报告
-
We will acknowledge receipt of your report within 48 hours.
-
一般在 3 个工作日内给出初步评估结果
-
An initial assessment will generally be provided within 3 business days.
4.
**漏洞处理流程
**
3.
**Vulnerability Handling Process
**
-
确认漏洞:我们会验证漏洞的存在性和影响范围
-
**Confirmation**
: We will verify the existence and scope of impact of the vulnerability.
-
修复开发:针对已确认的漏洞进行修复
-
**Fix Development**
: A fix will be developed for confirmed vulnerabilities.
-
版本发布:在下一个版本更新中发布安全补丁
-
**Release**
: Security patches will be released in the next version update.
-
公开披露:在修复完成后,我们会在更新日志中公布相关信息
-
**Public Disclosure**
: After the fix is complete, relevant information will be published in the changelog.
5.
**注意事项
**
4.
**Important Notes
**
-
在漏洞未修复前,请勿公开披露漏洞详情
-
Please do not publicly disclose vulnerability details before a fix has been released.
-
我们欢迎负责任的漏洞披露
-
We welcome responsible vulnerability disclosure.
-
对于重大贡献者,我们会在项目致谢名单中提及
-
Significant contributors will be acknowledged in the project's credits.
感谢您为 FastGPT 的安全性做出贡献!
Thank you for contributing to the security of FastGPT!
document/content/docs/self-host/upgrading/4-14/41411.mdx
View file @
e3b5b378
...
@@ -13,3 +13,4 @@ description: 'FastGPT V4.14.11 更新说明'
...
@@ -13,3 +13,4 @@ description: 'FastGPT V4.14.11 更新说明'
## 🐛 修复
## 🐛 修复
1. 对话 Agent 模式,模型存在刷新后被重置问题。
1. 对话 Agent 模式,模型存在刷新后被重置问题。
2. 部分接口未正确进行权限校验。
\ No newline at end of file
document/data/doc-last-modified.json
View file @
e3b5b378
...
@@ -221,7 +221,7 @@
...
@@ -221,7 +221,7 @@
"document/content/docs/self-host/upgrading/4-14/4141.en.mdx"
:
"2026-03-03T17:39:47+08:00"
,
"document/content/docs/self-host/upgrading/4-14/4141.en.mdx"
:
"2026-03-03T17:39:47+08:00"
,
"document/content/docs/self-host/upgrading/4-14/4141.mdx"
:
"2026-03-03T17:39:47+08:00"
,
"document/content/docs/self-host/upgrading/4-14/4141.mdx"
:
"2026-03-03T17:39:47+08:00"
,
"document/content/docs/self-host/upgrading/4-14/41410.en.mdx"
:
"2026-03-31T23:15:29+08:00"
,
"document/content/docs/self-host/upgrading/4-14/41410.en.mdx"
:
"2026-03-31T23:15:29+08:00"
,
"document/content/docs/self-host/upgrading/4-14/41410.mdx"
:
"2026-04-0
2T13:43:47
+08:00"
,
"document/content/docs/self-host/upgrading/4-14/41410.mdx"
:
"2026-04-0
8T16:15:25
+08:00"
,
"document/content/docs/self-host/upgrading/4-14/41411.mdx"
:
"2026-04-07T21:48:43+08:00"
,
"document/content/docs/self-host/upgrading/4-14/41411.mdx"
:
"2026-04-07T21:48:43+08:00"
,
"document/content/docs/self-host/upgrading/4-14/4142.en.mdx"
:
"2026-03-03T17:39:47+08:00"
,
"document/content/docs/self-host/upgrading/4-14/4142.en.mdx"
:
"2026-03-03T17:39:47+08:00"
,
"document/content/docs/self-host/upgrading/4-14/4142.mdx"
:
"2026-03-03T17:39:47+08:00"
,
"document/content/docs/self-host/upgrading/4-14/4142.mdx"
:
"2026-03-03T17:39:47+08:00"
,
...
...
projects/app/src/pages/api/core/app/mcpTools/getChildren.ts
View file @
e3b5b378
import
type
{
ApiRequestProps
,
ApiResponseType
}
from
'@fastgpt/service/type/next'
;
import
type
{
ApiRequestProps
,
ApiResponseType
}
from
'@fastgpt/service/type/next'
;
import
{
NextAPI
}
from
'@/service/middleware/entry'
;
import
{
NextAPI
}
from
'@/service/middleware/entry'
;
import
{
MongoApp
}
from
'@fastgpt/service/core/app/schema'
;
import
{
AppTypeEnum
}
from
'@fastgpt/global/core/app/constants'
;
import
{
AppTypeEnum
}
from
'@fastgpt/global/core/app/constants'
;
import
{
UserError
}
from
'@fastgpt/global/common/error/utils'
;
import
{
UserError
}
from
'@fastgpt/global/common/error/utils'
;
import
{
getMCPChildren
}
from
'@fastgpt/service/core/app/mcp'
;
import
{
getMCPChildren
}
from
'@fastgpt/service/core/app/mcp'
;
...
@@ -11,6 +10,8 @@ import {
...
@@ -11,6 +10,8 @@ import {
type
GetMcpChildrenQueryType
,
type
GetMcpChildrenQueryType
,
type
GetMcpChildrenResponseType
type
GetMcpChildrenResponseType
}
from
'@fastgpt/global/openapi/core/app/mcpTools/api'
;
}
from
'@fastgpt/global/openapi/core/app/mcpTools/api'
;
import
{
authApp
}
from
'@fastgpt/service/support/permission/app/auth'
;
import
{
ReadPermissionVal
}
from
'@fastgpt/global/support/permission/constant'
;
async
function
handler
(
async
function
handler
(
req
:
ApiRequestProps
<
{},
GetMcpChildrenQueryType
>
,
req
:
ApiRequestProps
<
{},
GetMcpChildrenQueryType
>
,
...
@@ -18,9 +19,7 @@ async function handler(
...
@@ -18,9 +19,7 @@ async function handler(
):
Promise
<
GetMcpChildrenResponseType
>
{
):
Promise
<
GetMcpChildrenResponseType
>
{
const
{
id
,
searchKey
}
=
GetMcpChildrenQuerySchema
.
parse
(
req
.
query
);
const
{
id
,
searchKey
}
=
GetMcpChildrenQuerySchema
.
parse
(
req
.
query
);
const
app
=
await
MongoApp
.
findOne
({
_id
:
id
}).
lean
();
const
{
app
}
=
await
authApp
({
req
,
authToken
:
true
,
appId
:
id
,
per
:
ReadPermissionVal
});
if
(
!
app
)
return
Promise
.
reject
(
new
UserError
(
'No Mcp Toolset found'
));
if
(
app
.
type
!==
AppTypeEnum
.
mcpToolSet
)
if
(
app
.
type
!==
AppTypeEnum
.
mcpToolSet
)
return
Promise
.
reject
(
new
UserError
(
'the parent is not a mcp toolset'
));
return
Promise
.
reject
(
new
UserError
(
'the parent is not a mcp toolset'
));
...
...
projects/app/src/pages/api/core/app/mcpTools/getTools.ts
View file @
e3b5b378
...
@@ -9,11 +9,14 @@ import {
...
@@ -9,11 +9,14 @@ import {
type
GetMcpToolsResponseType
type
GetMcpToolsResponseType
}
from
'@fastgpt/global/openapi/core/app/mcpTools/api'
;
}
from
'@fastgpt/global/openapi/core/app/mcpTools/api'
;
import
{
isInternalAddress
,
PRIVATE_URL_TEXT
}
from
'@fastgpt/service/common/system/utils'
;
import
{
isInternalAddress
,
PRIVATE_URL_TEXT
}
from
'@fastgpt/service/common/system/utils'
;
import
{
authCert
}
from
'@fastgpt/service/support/permission/auth/common'
;
async
function
handler
(
async
function
handler
(
req
:
ApiRequestProps
<
GetMcpToolsBodyType
>
,
req
:
ApiRequestProps
<
GetMcpToolsBodyType
>
,
_res
:
ApiResponseType
<
any
>
_res
:
ApiResponseType
<
any
>
):
Promise
<
GetMcpToolsResponseType
>
{
):
Promise
<
GetMcpToolsResponseType
>
{
await
authCert
({
req
,
authToken
:
true
});
const
{
url
,
headerSecret
}
=
GetMcpToolsBodySchema
.
parse
(
req
.
body
);
const
{
url
,
headerSecret
}
=
GetMcpToolsBodySchema
.
parse
(
req
.
body
);
if
(
await
isInternalAddress
(
url
))
{
if
(
await
isInternalAddress
(
url
))
{
...
...
projects/app/src/pages/api/core/app/mcpTools/runTool.ts
View file @
e3b5b378
...
@@ -8,11 +8,14 @@ import {
...
@@ -8,11 +8,14 @@ import {
type
RunMcpToolResponseType
type
RunMcpToolResponseType
}
from
'@fastgpt/global/openapi/core/app/mcpTools/api'
;
}
from
'@fastgpt/global/openapi/core/app/mcpTools/api'
;
import
{
isInternalAddress
,
PRIVATE_URL_TEXT
}
from
'@fastgpt/service/common/system/utils'
;
import
{
isInternalAddress
,
PRIVATE_URL_TEXT
}
from
'@fastgpt/service/common/system/utils'
;
import
{
authCert
}
from
'@fastgpt/service/support/permission/auth/common'
;
async
function
handler
(
async
function
handler
(
req
:
ApiRequestProps
<
RunMcpToolBodyType
>
,
req
:
ApiRequestProps
<
RunMcpToolBodyType
>
,
_res
:
ApiResponseType
<
any
>
_res
:
ApiResponseType
<
any
>
):
Promise
<
RunMcpToolResponseType
>
{
):
Promise
<
RunMcpToolResponseType
>
{
await
authCert
({
req
,
authToken
:
true
});
const
{
url
,
toolName
,
headerSecret
,
params
}
=
RunMcpToolBodySchema
.
parse
(
req
.
body
);
const
{
url
,
toolName
,
headerSecret
,
params
}
=
RunMcpToolBodySchema
.
parse
(
req
.
body
);
if
(
await
isInternalAddress
(
url
))
{
if
(
await
isInternalAddress
(
url
))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment