Skip to content

First login via LDAP fails if there is no avatar #35884

@zencak-ica

Description

@zencak-ica

Description

When a LDAP user that Gitea does not yet know tries to log in for the first time and does not have an avatar (and the auth source has the Avatar Attribute set), it fails, and the second attempt succeeds.

The log contains the following lines:

2025/11/06 13:28:00 services/auth/signin.go:119:UserSignIn() [W] Failed to login 'git-test' via 'FreeIPA': image.DecodeConfig: image: unknown format
2025/11/06 13:28:00 routers/web/auth/auth.go:222:SignInPost() [W] Failed authentication attempt for git-test from <redacted>: user does not exist [uid: 0, name: git-test]

Subsequent login attempts succeed.

Gitea Version

1.24.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Downloaded the official release

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions