{"record":{"id":"fe2f984f1b115a43","repo":"fish2018/pansou","slug":"susu","errorCode":null,"errorMessage":"[susu] 按钮返回无效链接","messagePattern":"\\[susu\\] 按钮返回无效链接","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/susu/susu.go","lineNumber":487,"sourceCode":"\tvar buttonDetail buttonDetailResponse\n\tif err := json.Unmarshal(respBody, &buttonDetail); err != nil {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 解析按钮详情失败: %w\", err)\n\t}\n\n\t// 如果URL为空\n\tif buttonDetail.Button.URL == \"\" {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 按钮URL为空\")\n\t}\n\n\t// 解析JWT token获取真实链接\n\trealURL, err := p.decodeJWTURL(buttonDetail.Button.URL)\n\tif err != nil {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 解析JWT失败: %w\", err)\n\t}\n\trealURL = strings.TrimSpace(realURL)\n\tparsedURL, err := url.Parse(realURL)\n\tif err != nil || (parsedURL.Scheme != \"http\" && parsedURL.Scheme != \"https\") || parsedURL.Host == \"\" {\n\t\treturn model.Link{}, fmt.Errorf(\"[susu] 按钮返回无效链接\")\n\t}\n\n\t// 创建链接\n\tlink := model.Link{\n\t\tURL:      realURL,\n\t\tType:     p.determineLinkType(realURL, buttonDetail.Button.Name),\n\t\tPassword: extractPassword(realURL, buttonDetail.Button.Attr.TQ),\n\t}\n\n\t// 缓存结果\n\tbuttonDetailCache.Store(cacheKey, link)\n\n\treturn link, nil\n}\n\n// decodeJWTURL 解析JWT token获取真实链接\nfunc (p *SusuAsyncPlugin) decodeJWTURL(jwtToken string) (string, error) {\n\tif strings.HasPrefix(jwtToken, \"http://\") || strings.HasPrefix(jwtToken, \"https://\") {","sourceCodeStart":469,"sourceCodeEnd":505,"githubUrl":"https://github.com/fish2018/pansou/blob/beaa56133755a548ebc51b090b3816e2ae044aa6/plugin/susu/susu.go#L469-L505","documentation":"Post-decode guard: the JWT decoded to a string that is not a usable link — url.Parse failed, or the scheme is not http/https. The upstream token is structurally valid but carries a garbage/relative payload.","triggerScenarios":"Thrown at plugin/susu/susu.go:487 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Log the decoded string to see the actual payload","Skip this result as permanently invalid","Consider prepending a base host if payloads are relative paths"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"beaa56133755a548ebc51b090b3816e2ae044aa6","analyzedAt":"2026-09-07T00:31:18.025Z","contentChangedAt":"2026-09-07T00:31:18.025Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}