{"record":{"id":"f5cdabf6d2ec2525","repo":"m1k1o/neko","slug":"invalid-password","errorCode":null,"errorMessage":"invalid password","messagePattern":"invalid password","errorType":"error_code","errorClass":"ErrMemberInvalidPassword","httpStatus":null,"severity":"warning","filePath":"server/pkg/types/member.go","lineNumber":8,"sourceCode":"package types\n\nimport \"errors\"\n\nvar (\n\tErrMemberAlreadyExists   = errors.New(\"member already exists\")\n\tErrMemberDoesNotExist    = errors.New(\"member does not exist\")\n\tErrMemberInvalidPassword = errors.New(\"invalid password\")\n)\n\ntype MemberProfile struct {\n\tName string `json:\"name\"`\n\n\t// permissions\n\tIsAdmin               bool `json:\"is_admin\"                 mapstructure:\"is_admin\"`\n\tCanLogin              bool `json:\"can_login\"                mapstructure:\"can_login\"`\n\tCanConnect            bool `json:\"can_connect\"              mapstructure:\"can_connect\"`\n\tCanWatch              bool `json:\"can_watch\"                mapstructure:\"can_watch\"`\n\tCanHost               bool `json:\"can_host\"                 mapstructure:\"can_host\"`\n\tCanShareMedia         bool `json:\"can_share_media\"          mapstructure:\"can_share_media\"`\n\tCanAccessClipboard    bool `json:\"can_access_clipboard\"     mapstructure:\"can_access_clipboard\"`\n\tSendsInactiveCursor   bool `json:\"sends_inactive_cursor\"    mapstructure:\"sends_inactive_cursor\"`\n\tCanSeeInactiveCursors bool `json:\"can_see_inactive_cursors\" mapstructure:\"can_see_inactive_cursors\"`\n\n\t// plugin scope\n\tPlugins PluginSettings `json:\"plugins\"`","sourceCodeStart":1,"sourceCodeEnd":26,"githubUrl":"https://github.com/m1k1o/neko/blob/b0f01cedea68893e85a3fd852c0521238c285695/server/pkg/types/member.go#L1-L26","documentation":"ErrMemberInvalidPassword is a sentinel error in the neko types package signaling that the supplied password does not match the stored hash for a member during credential checks. It is returned by Login and by MemberProvider.Authenticate when the username exists but authentication fails because of a wrong password (not because the user is missing).","triggerScenarios":"Login(username, password) where the password hash comparison fails; MemberProvider.Authenticate with a mismatched password for an existing user.","commonSituations":"Typo or wrong keyboard layout when typing credentials; stale credentials after a password change; clients caching old tokens/passwords; environment configs loading credentials from a different member store than expected.","solutions":["Retry authentication with the correct password.","Reset the member's password (UpdatePassword) or recreate the member with the intended credentials.","Confirm the client is connecting to the intended server instance whose member store matches the credentials.","Check that the provider's password hashing/verification configuration hasn't changed between versions.","Log failed-login attempts (without logging the password) to distinguish typos from attacks."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// caller-side sanity check before sending\nif username == \"\" || password == \"\" {\n    return errors.New(\"username and password required\")\n}","typeGuard":null,"tryCatchPattern":"_, _, err := manager.Login(username, password)\nif errors.Is(err, types.ErrMemberInvalidPassword) {\n    // surface 'wrong password' to user; apply rate limiting\n    return\n}\nreturn err","preventionTips":["Rate-limit and lock out after repeated failures.","Never log the attempted password.","Notify users after password resets to update cached clients.","Use a password manager / secrets store for automated clients."],"tags":["auth","password","credentials","go"],"backgroundTag":"invalid-credentials","analyzedSha":"b0f01cedea68893e85a3fd852c0521238c285695","analyzedAt":"2026-09-01T10:35:56.638Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}