{"record":{"id":"ee3abd9c703aee19","repo":"AlistGo/alist","slug":"need-verify-a-target-blank-href-s-click-he-ee3abd","errorCode":null,"errorMessage":"need verify: <a target=\"_blank\" href=\"%s\">Click Here</a>","messagePattern":"need verify: <a target=\"_blank\" href=\"(.+?)\">Click Here</a>","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"drivers/thunder_browser/util.go","lineNumber":171,"sourceCode":"\t\tMeta:         metas,\n\t\tRedirectUri:  \"xlaccsdk01://xunlei.com/callback?state=harbor\",\n\t}\n\tvar e ErrResp\n\tvar resp CaptchaTokenResponse\n\t_, err := c.Request(XLUSER_API_URL+\"/shield/captcha/init\", http.MethodPost, func(req *resty.Request) {\n\t\treq.SetError(&e).SetBody(param)\n\t}, &resp)\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif e.IsError() {\n\t\treturn &e\n\t}\n\n\tif resp.Url != \"\" {\n\t\treturn fmt.Errorf(`need verify: <a target=\"_blank\" href=\"%s\">Click Here</a>`, resp.Url)\n\t}\n\n\tif resp.CaptchaToken == \"\" {\n\t\treturn fmt.Errorf(\"empty captchaToken\")\n\t}\n\n\tif c.refreshCTokenCk != nil {\n\t\tc.refreshCTokenCk(resp.CaptchaToken)\n\t}\n\tc.SetCaptchaToken(resp.CaptchaToken)\n\treturn nil\n}\n\n// Request 只有基础信息的请求\nfunc (c *Common) Request(url, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) {\n\treq := c.client.R().SetHeaders(map[string]string{\n\t\t\"user-agent\":       c.UserAgent,\n\t\t\"accept\":           \"application/json;charset=UTF-8\",","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/thunder_browser/util.go#L153-L189","documentation":"Returned by the Thunder browser driver's captcha-token endpoint wrapper when the API response contains a non-empty Url field instead of a captcha token. The presence of Url means the account must pass an interactive verification (slide captcha / device check) in a browser before API calls succeed; the error embeds the verification link as an HTML anchor.","triggerScenarios":"Calling the internal captchaToken request (inside Common/verification helper in drivers/thunder_browser/util.go) where resp.Url != \"\" after a successful HTTP round trip with no ErrResp — typically when requesting a captcha token for login or for refreshing an expired one.","commonSituations":"New-device or new-IP logins to Thunder via the browser (quanji) API, expired captcha tokens after long uptime, or aggressive request rates triggering the verification wall.","solutions":["Open the URL from the error message in a browser (target=_blank link), complete the verification, then retry the operation.","Re-run the driver login so a fresh captcha token is obtained after verification.","Reduce restart/request frequency or pin a stable egress IP to avoid repeated verification challenges."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"err := c.getCaptchaToken(...)\nif err != nil {\n    if strings.Contains(err.Error(), \"need verify\") {\n        // extract href, prompt user to open it, then retry once after delay\n    }\n    return err\n}","preventionTips":["Keep captcha token cached via refreshCTokenCk so the endpoint is hit rarely","Complete the browser verification promptly when the link appears","Use stable egress IP for Thunder browser mounts"],"tags":["thunder","captcha","verification","authentication"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}