fix(core): validate file sharing requests
Keep QQ share-code lookups on a bounded and predictable request path while preserving existing successful usage through plain codes and official links. Reject unsupported inputs early, align operator-facing action documentation, and add regression coverage for valid links, malformed responses, and resource limits.
This commit is contained in:
5 files changed
+229
-12
No files matched your search
@@ -3038,7 +3038,7 @@
|
||||
{
|
||||
"name": "get_fileset_id",
|
||||
"aliases": [],
|
||||
"summary": "从分享码/链接获取 fileset_id",
|
||||
"summary": "从 QQ 闪传分享码或官方分享链接获取 fileset_id",
|
||||
"returns": "{ fileset_id }:解析出的文件集 ID。",
|
||||
"returnsSchema": {
|
||||
"type": "object",
|
||||
@@ -3061,7 +3061,8 @@
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"desc": "QQ 闪传分享码,或 https://qfile.qq.com/q/... 官方分享链接"
|
||||
}
|
||||
],
|
||||
"invariants": [],
|
||||
@@ -3070,7 +3071,8 @@
|
||||
"properties": {
|
||||
"share_code": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"description": "QQ 闪传分享码,或 https://qfile.qq.com/q/... 官方分享链接"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -3041,7 +3041,7 @@ export const ACTIONS: CatalogAction[] = [
|
||||
{
|
||||
"name": "get_fileset_id",
|
||||
"aliases": [],
|
||||
"summary": "从分享码/链接获取 fileset_id",
|
||||
"summary": "从 QQ 闪传分享码或官方分享链接获取 fileset_id",
|
||||
"returns": "{ fileset_id }:解析出的文件集 ID。",
|
||||
"returnsSchema": {
|
||||
"type": "object",
|
||||
@@ -3064,7 +3064,8 @@ export const ACTIONS: CatalogAction[] = [
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
}
|
||||
},
|
||||
"desc": "QQ 闪传分享码,或 https://qfile.qq.com/q/... 官方分享链接"
|
||||
}
|
||||
],
|
||||
"invariants": [],
|
||||
@@ -3073,7 +3074,8 @@ export const ACTIONS: CatalogAction[] = [
|
||||
"properties": {
|
||||
"share_code": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
"minLength": 1,
|
||||
"description": "QQ 闪传分享码,或 https://qfile.qq.com/q/... 官方分享链接"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
Reference in new issue
Block a user