mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-08-26 03:22:02 +00:00
Merge pull request #204 from newbie000652/fix/uc-subdirectory-stoken
fix: UC subdirectory listing fails due to missing stoken parameter
This commit is contained in:
@@ -386,6 +386,16 @@
|
||||
"type": "string",
|
||||
"example": "uuid123"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "stoken",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"description": "分享 token,用于子目录解析时复用认证状态",
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"example": "OASBe5qM0pg2VvvyLM..."
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
@@ -68,9 +68,9 @@ public class URLParamUtil {
|
||||
boolean firstParam = !decodedUrl.contains("?");
|
||||
|
||||
for (String paramName : params.names()) {
|
||||
// 忽略 "url", "pwd", "dirId", "uuid", "auth" 参数(这些参数单独处理,不应拼接到分享URL中)
|
||||
// 忽略 "url", "pwd", "dirId", "uuid", "auth", "stoken" 参数(这些参数单独处理,不应拼接到分享URL中)
|
||||
if (!paramName.equals("url") && !paramName.equals("pwd") && !paramName.equals("dirId")
|
||||
&& !paramName.equals("uuid") && !paramName.equals("auth")) {
|
||||
&& !paramName.equals("uuid") && !paramName.equals("auth") && !paramName.equals("stoken")) {
|
||||
if (firstParam) {
|
||||
urlBuilder.append("?");
|
||||
firstParam = false;
|
||||
|
||||
@@ -161,7 +161,7 @@ public class ParserApi {
|
||||
|
||||
@RouteMapping("/getFileList")
|
||||
public Future<List<FileInfo>> getFileList(HttpServerRequest request, String pwd, String dirId, String uuid,
|
||||
String auth) {
|
||||
String stoken, String auth) {
|
||||
String url = URLParamUtil.parserParams(request);
|
||||
ParserCreate parserCreate;
|
||||
try {
|
||||
@@ -176,6 +176,9 @@ public class ParserApi {
|
||||
if (StringUtils.isNotBlank(dirId)) {
|
||||
parserCreate.getShareLinkInfo().getOtherParam().put("dirId", dirId);
|
||||
}
|
||||
if (StringUtils.isNotBlank(stoken)) {
|
||||
parserCreate.getShareLinkInfo().getOtherParam().put("stoken", stoken);
|
||||
}
|
||||
if (StringUtils.isNotBlank(uuid)) {
|
||||
parserCreate.getShareLinkInfo().getOtherParam().put("uuid", uuid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user