{"record":{"id":"dfe46d449803b0e4","repo":"AlistGo/alist","slug":"need-verify-a-target-blank-href-s-click-he-dfe46d","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/thunderx/util.go","lineNumber":175,"sourceCode":"\t\tMeta:         metas,\n\t\tRedirectUri:  \"xlaccsdk01://xbase.cloud/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":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/AlistGo/alist/blob/843d9dc8149126976b2625911e45a4d3ffd6f2f5/drivers/thunderx/util.go#L157-L193","documentation":"ThunderX driver's copy of the captcha verification gate: when the captcha-token API responds with a non-empty Url, the account must complete interactive verification before a token is granted. The error surfaces the verification link as an HTML <a> so frontends can render a clickable link.","triggerScenarios":"Any ThunderX login/captcha-token refresh inside drivers/thunderx/util.go where resp.Url != \"\" — new device sign, changed IP, or expired captcha token during a session.","commonSituations":"Running ThunderX (the Xunlei international/thunder-x API variant) behind NAT with rotating IPs, container restarts regenerating device IDs, or after Xunlei tightens risk control.","solutions":["Click the verification URL in the error, complete the challenge in the browser, then retry.","Re-login to the ThunderX mount so a fresh captcha token is fetched post-verification.","Keep the device sign stable (persist DeviceID config) to reduce repeat challenges."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"need verify\") {\n    url := extractHref(err.Error()) // parse href=\"%s\"\n    notifyUser(url)                 // user completes verification, then retry\n}","preventionTips":["Persist device identity across restarts","Handle the verification link as a user-action flow, not a hard failure","Retry the operation once after verification completes"],"tags":["thunderx","captcha","verification","authentication"],"backgroundTag":null,"analyzedSha":"843d9dc8149126976b2625911e45a4d3ffd6f2f5","analyzedAt":"2026-08-15T12:14:11.722Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}