{"record":{"id":"e5fd2be3b911f768","repo":"shadow1ng/fscan","slug":"service-auth-failed-s","errorCode":null,"errorMessage":"service_auth_failed: %s","messagePattern":"service_auth_failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/redis.go","lineNumber":138,"sourceCode":"\t\t\t\tErrorType: ErrorTypeNetwork,\n\t\t\t\tError:     readErr,\n\t\t\t}\n\t\t}\n\n\t\tresponseStr := string(response[:n])\n\t\tif !strings.Contains(responseStr, \"+OK\") {\n\t\t\t_ = conn.Close()\n\t\t\terrType := ErrorTypeUnknown\n\t\t\tif strings.Contains(responseStr, \"WRONGPASS\") ||\n\t\t\t\tstrings.Contains(responseStr, \"invalid password\") ||\n\t\t\t\tstrings.Contains(responseStr, \"ERR AUTH\") ||\n\t\t\t\tstrings.Contains(responseStr, \"NOAUTH\") {\n\t\t\t\terrType = ErrorTypeAuth\n\t\t\t}\n\t\t\treturn &AuthResult{\n\t\t\t\tSuccess:   false,\n\t\t\t\tErrorType: errType,\n\t\t\t\tError:     fmt.Errorf(i18n.GetText(\"service_auth_failed\")+\": %s\", strings.TrimSpace(responseStr)),\n\t\t\t}\n\t\t}\n\t}\n\n\t// 发送PING命令测试连接\n\tpingCmd := \"PING\\r\\n\"\n\t_ = conn.SetWriteDeadline(time.Now().Add(timeout))\n\tif _, pingWriteErr := conn.Write([]byte(pingCmd)); pingWriteErr != nil {\n\t\t_ = conn.Close()\n\t\treturn &AuthResult{\n\t\t\tSuccess:   false,\n\t\t\tErrorType: ErrorTypeNetwork,\n\t\t\tError:     pingWriteErr,\n\t\t}\n\t}\n\n\t_ = conn.SetReadDeadline(time.Now().Add(timeout))\n\tresponse := make([]byte, 512)","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/redis.go#L120-L156","documentation":"Guard in doRedisAuth: the AUTH reply did not contain '+OK'. The response text is inspected for WRONGPASS/invalid password/ERR AUTH/NOAUTH to classify the failure as ErrorTypeAuth; otherwise it stays ErrorTypeUnknown, and the trimmed server response is appended for diagnosis.","triggerScenarios":"Thrown at plugins/services/redis.go:138 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Treat WRONGPASS replies as wrong credential and continue the dictionary","For NOAUTH-class replies verify the Redis instance requires a password at all","Inspect the appended raw response when the error type is unknown"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}