Skip to content

[Bug]: Can't set quota from LDAP (or ldap default quota) if display name is not set #59432

@balintbarna

Description

@balintbarna

⚠️ This issue respects the following points: ⚠️

Bug description

My server has Nextcloud configured to the LLDAP server for managing accounts and groups. I configure the LDAP app in Nextcloud via occ from a systemd service. The relevant parts of it:

      ${occ} ldap:set-config s01 ldapUserDisplayName "displayName"
      ${occ} ldap:set-config s01 ldapQuotaAttribute "${quotaAttribute}"
      ${occ} ldap:set-config s01 ldapQuotaDefault "${defaultQuota}"

Separately:

  defaultQuota = "500 GB";
  quotaAttribute = "nextcloudQuota";

I can verify on the web UI that all the LDAP app parameters get set correctly by my script.
When a user in LLDAP has username, email and display name, everything works correctly, the default quota shown by default, and if I change the nextcloudQuota parameter, it will get propagated in Nextcloud.

However, if a user has username and email but NO display name, then the user will have none (Unlimited) as their quota value. So it doesn't get the configured value or the default value either. Having no display name prevents quota and possibly more properties being synced.

Steps to reproduce

  1. Set up LDAP server (eg. LLDAP)
  2. Set up Nextcloud with LDAP app configured, with default LDAP quota and LDAP quota attribute correctly set
  3. Create user in LLDAP, don't set display name
  4. Set quota from LLDAP

Expected behavior

User has first the default quota then the quota set via LDAP

Nextcloud Server version

32

Operating system

Other

PHP engine version

None

Web server

None

Database engine version

None

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

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

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

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

Possibly relevant code:
https://github.com/nextcloud/server/blob/stable32/apps/user_ldap/lib/User/User.php#L88-L101
https://github.com/nextcloud/server/blob/stable32/apps/user_ldap/lib/User/User.php#L525-L578
https://github.com/nextcloud/server/blob/stable32/apps/user_ldap/lib/Access.php#L922-L937

Note: this was found by a LLM while debugging my issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions