Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The default profile picture gets the wrong value (letters) on some pages with OIDC #965

Open
6 of 8 tasks
Hmmmz opened this issue Oct 15, 2024 · 1 comment
Open
6 of 8 tasks
Labels
0. Needs triage bug Something isn't working

Comments

@Hmmmz
Copy link

Hmmmz commented Oct 15, 2024

⚠️ This issue respects the following points: ⚠️

Bug description

The default profile image letters (that should be first letter from the first two words in the "Display Name") is getting the "Username" instead on some pages when using "OpenID Connect" with Keycloak.

Steps to reproduce

If there is a local user it shows the correct data and I see these are in the "oc_users" table in the database with "Display Name" set.
The users from "OpenID Connect" look like they are in the "oc_user_oidc" table in the database and they have all have "Display Name" set as the users name and "Username" is a GUID.

The pages I've found shows the wrong pictures (and sometimes cache them on other sites) are the following:

  • Profile page:

Always shows the username in the picture.
This page also cache:s the wrong image for the local user so it shows wrong on some other pages (For example the picture in top right) until you clean your cache.

Wrong letters (Should be "UA")
Image

The cache:d image in top right: (Correct)
Image

The cache:d image in top right: (Wrong)
Image

  • Edit "Personal info" page:

Shows wrong in the top left profile picture but not in the "preview" profile page.
This page also cache:s the wrong image for the local user so it shows wrong on some other pages (For example the picture in top right) until you clean your cache.

Example:
Image

  • Contacts page (App):

The default list that gets the users from the system (principals/system/system) is wrong in the initial list (and "Not grouped").

The default contact list:
Image

If you for example create a circle and add members then it is correct there:
Image

Also correct under members list:
Image

Expected behavior

The default profile picture should always use the letters in "Display Name" if it is set.

Nextcloud Server version

30

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "debug": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "30.0.1.1",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": true,
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\Illustrator",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MSOffice2003",
            "OC\\Preview\\MSOffice2007",
            "OC\\Preview\\MSOfficeDoc",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\PDF",
            "OC\\Preview\\Photoshop",
            "OC\\Preview\\Postscript",
            "OC\\Preview\\StarOffice",
            "OC\\Preview\\SVG",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\Font"
        ],
        "preview_max_x": 1024,
        "preview_max_y": 768,
        "preview_max_scale_facto": 1,
        "auth.bruteforce.protection.enabled": true,
        "trashbin_retention_obligation": "auto,7",
        "skeletondirectory": "",
        "defaultapp": "",
        "activity_expire_days": 14,
        "integrity.check.disabled": false,
        "updater.release.channel": "beta",
        "theme": "",
        "default_phone_region": "SE",
        "maintenance": false,
        "allow_local_remote_servers": true,
        "oidc_login_auto_redirect": true,
        "oidc_login_redir_fallback": true,
        "default_language": "SE",
        "loglevel": 3,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_send_plaintext_only": true
    }
}

### List of activated Apps

Enabled:
  - activity: 3.0.0
  - admin_audit: 1.20.0
  - app_api: 4.0.0
  - calendar: 5.0.1
  - circles: 30.0.0-dev
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - contacts: 6.1.0
  - contactsinteraction: 1.11.0
  - dashboard: 7.10.0
  - dav: 1.31.1
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_downloadlimit: 3.0.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - groupfolders: 18.0.3
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - mail: 4.0.1
  - nextcloud_announcements: 2.0.0
  - notifications: 3.0.0
  - oauth2: 1.18.1
  - ocs_api_viewer: 1.0.7
  - onlyoffice: 9.4.0
  - password_policy: 2.0.0
  - photos: 3.0.2
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - richdocuments: 8.5.1
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - spreed: 20.0.1
  - support: 2.0.0
  - systemtags: 1.20.0
  - text: 4.1.0
  - theming: 2.5.0
  - twofactor_backupcodes: 1.19.0
  - updatenotification: 1.20.0
  - user_oidc: 6.0.1
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - workflowengine: 2.12.0
Disabled:
  - bruteforcesettings: 3.0.0 (installed 2.8.0)
  - encryption: 2.18.0
  - files_external: 1.22.0
  - firstrunwizard: 3.0.0 (installed 2.17.0)
  - survey_client: 2.0.0 (installed 1.16.0)
  - suspicious_login: 8.0.0
  - twofactor_nextcloud_notification: 4.0.0
  - twofactor_totp: 12.0.0-dev
  - user_ldap: 1.21.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

Do I need to create a bug report in the contact app aswell?

@Hmmmz Hmmmz added 0. Needs triage bug Something isn't working labels Oct 15, 2024
@joshtrichards joshtrichards transferred this issue from nextcloud/server Oct 15, 2024
@nwin
Copy link

nwin commented Jan 1, 2025

I have a similar issue, for me it is actually consistently wrong on the profile page. Can't tell about the address book since I don't use it.

It is weird since the Avatar should use the display name which is set correctly but for the Avatar it seems to fall back to the user name, which is set to the uuid in accordance to the manual of authentik. It is noteworthy, that the getDisplayName of this app has actually a fallback for that.

Image

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants