Skip to content

email requirement not enforced#1019

Description

@kousu

How to use GitHub

  • Please use the 馃憤 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Install nextcloud, user_ldap, ldap_write_support, and hook it all up to an LDAP server
  2. In ldap settings, enable "An LDAP user must have an email address set."
  3. Run php occ user:add User2 -g Group1 -g Group2 -g Group3 in your nextcloud install folder, and provide a new password as requested.

Expected behaviour

The user should be rejected because --email was not given.

Actual behaviour

LDAP users are created with no emails:

accounts pane

LDIF
# slapcat

# ...
dn: uid=user1,dc=files,dc=tilde,dc=xyz
objectClass: inetOrgPerson
uid: User1
displayName: User1
cn: User1
sn: User1
structuralObjectClass: inetOrgPerson
entryUUID: fc8ba328-cf8d-103f-985f-e331a8fa2229
creatorsName: cn=admin,dc=files,dc=tilde,dc=xyz
createTimestamp: 20250527213334Z
userPassword:: e1NTSEF9N0ZETzg2d1g4Z3pLMzQ1bVNqem9lYW1XdUdVTkZzSGE=
entryCSN: 20250527213334.215688Z#000000#000#000000
modifyTimestamp: 20250527213334Z
memberOf: cn=group1,dc=files,dc=tilde,dc=xyz
memberOf: cn=group2,dc=files,dc=tilde,dc=xyz
memberOf: cn=group3,dc=files,dc=tilde,dc=xyz
modifiersName: cn=admin,dc=files,dc=tilde,dc=xyz
# ....

Server configuration

Web server: Nginx

Database: PostgreSQL

PHP version: 8.2

Nextcloud version: 31.0.5

List of activated apps
Enabled:
  - appointments: 2.4.4
  - bruteforcesettings: 4.0.0
  - calendar: 5.2.4
  - calendar_resource_management: 0.9.0
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - collectives: 2.17.1
  - comments: 1.21.0
  - contacts: 7.1.1
  - cospend: 3.0.11
  - dav: 1.33.0
  - federatedfilesharing: 1.21.0
  - files: 2.3.1
  - files_accesscontrol: 2.0.0
  - files_downloadlimit: 4.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - forms: 5.1.0
  - gpxpod: 7.0.4
  - groupfolders: 19.0.4
  - impersonate: 2.0.0
  - ldap_write_support: 1.13.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - mail: 5.1.1
  - money: 0.30.0
  - notifications: 4.0.0
  - oauth2: 1.19.1
  - polls: 7.4.3
  - previewgenerator: 5.8.0
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - richdocuments: 8.6.5
  - richdocumentscode: 24.4.1303
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sociallogin: 6.0.1
  - survey_client: 3.0.0
  - text: 5.0.0
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - twofactor_nextcloud_notification: 5.0.0
  - twofactor_totp: 13.0.0-dev.0
  - updatenotification: 1.21.0
  - user_ldap: 1.22.0
  - viewer: 4.0.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - activity: 4.0.0 (installed 2.17.0)
  - admin_audit: 1.21.0
  - app_api: 5.0.2 (installed 5.0.2)
  - contactsinteraction: 1.12.0 (installed 1.6.0)
  - dashboard: 7.11.0 (installed 7.5.0)
  - deck: 1.15.1 (installed 1.15.1)
  - encryption: 2.19.0
  - federation: 1.21.0 (installed 1.15.0)
  - files_external: 1.23.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - firstrunwizard: 4.0.0 (installed 2.14.0)
  - flow_notifications: 2.0.1 (installed 2.0.1)
  - hedgenext: 0.0.15 (installed 0.0.15)
  - nextcloud_announcements: 3.0.0 (installed 1.14.0)
  - password_policy: 3.0.0 (installed 1.15.0)
  - photos: 4.0.0-dev.1 (installed 2.0.1)
  - recommendations: 4.0.0 (installed 1.4.0)
  - related_resources: 2.0.0 (installed 1.0.3)
  - sharebymail: 1.21.0 (installed 1.15.0)
  - shifts: 1.9.10 (installed 1.9.10)
  - spreed: 21.0.4 (installed 21.0.4)
  - support: 3.0.0 (installed 1.8.0)
  - suspicious_login: 9.0.1 (installed 4.3.0)
  - systemtags: 1.21.1 (installed 1.15.0)
  - theming_customcss: 1.18.0 (installed 1.18.0)
  - user_status: 1.11.0 (installed 1.5.0)
  - weather_status: 1.11.0 (installed 1.5.0)
  - workflow_script: 2.0.0 (installed 2.0.0)
Nextcloud configuration
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "org.yota.space"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "skeletondirectory": "",
        "dbtype": "mysql",
        "version": "31.0.5.1",
        "overwrite.cli.url": "https:\/\/org.yota.space",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "default_phone_region": "CA",
        "maintenance": false,
        "maintenance_window_start": 0,
        "enable_previews": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": [
            "files_ebookreader",
            "listman"
        ],
        "theme": "",
        "loglevel": 2,
        "defaultapp": "files",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "profile.enabled": false
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions