Skip to content

custom avatar url: fallback not working #10100

@konradmoesch

Description

@konradmoesch

Describe the bug
I have configured libravatar as custom avatar source, gravatar and initials as fallback. The config line looks like this:
https://seccdn.libravatar.org/avatar/%(mail_hash)s?d=404,gravatar,initials

If no libravatar is found (404 returned), no fallback to gravatar or initials is done. Instead, the "error image" is shown (see screenshot below)

To Reproduce
Steps to reproduce the behavior:

  1. Add custom avatar url (e.g. my example from above, any other would work, too, I believe)
  2. Try logging in with a user that has no avatar under that url
  3. Observe wrong avatar (e.g. in login flow, top right corner of /if/user or bottom left corner of /if/admin

Expected behavior
On a 404 (or maybe even any other error code), the next available fallback should be shown

Screenshots
grafik
I would expect "TU" as initials in this case.

Version and Deployment:

  • authentik version: [2024.4.2]
  • Deployment: docker-compose

Additional context
The url loaded in my example (testuser without a mail address) is https://seccdn.libravatar.org/avatar/d41d8cd98f00b204e9800998ecf8427e?d=404, which returns a 404

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions