nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
982 stars 241 forks source link

Calendar sharing autocomplete does not work for partial parts of names with LDAP #5042

Open AmatorPhasma opened 1 year ago

AmatorPhasma commented 1 year ago

Steps to reproduce

  1. Have users from LDAP Provider configured
  2. For example, have a user called: Test Lehrer
  3. Open calendar app
  4. open edit of a calendar or invite a user to an event by searching for a partial part of the name not form beginning.

This dosent work 001

Only if I type from the beginning works in the Search 002

Expected behavior

Same behavior as in files or deck app, you search there you can do this with partial parts of the name.

Example for the files app: 003

Actual behaviour

Does not search users/groups with partial parts of the name.

Calendar app version

4.2.4

CalDAV-clients used

No response

Browser

Firefox 110.0.1 and Google Chrome 110.0.5481.178

Client operating system

Windows 10/11

Server operating system

Debian 11

Web server

Nginx

Database engine version

MariaDB

PHP engine version

PHP 8.1

Nextcloud version

25.0.4

Updated from an older installed version or fresh install

Updated from an older version

List of activated apps

- activity: 2.17.0
  - admin_audit: 1.15.0
  - announcementcenter: 6.5.1
  - appointments: 1.14.11
  - calendar: 4.2.4
  - circles: 25.0.0
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - contacts: 5.1.0
  - contactsinteraction: 1.6.0
  - dashboard: 7.5.0
  - dav: 1.24.0
  - deck: 1.8.3
  - external: 5.0.2
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_mindmap: 0.0.27
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - group_default_quota: 0.1.5
  - groupfolders: 13.1.1
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - mail: 2.2.4
  - nextcloud_announcements: 1.14.0
  - notifications: 2.13.1
  - notify_push: 0.6.0
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - photos: 2.0.1
  - polls: 4.1.2
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - quota_warning: 1.15.0
  - recommendations: 1.4.0
  - related_resources: 1.0.4
  - richdocuments: 7.1.1
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - side_menu: 3.6.0
  - support: 1.8.0
  - systemtags: 1.15.0
  - tasks: 0.14.5
  - text: 3.6.0
  - theming: 2.0.1
  - twofactor_backupcodes: 1.14.0
  - unsplash: 2.2.0
  - updatenotification: 1.15.0
  - user_ldap: 1.15.0
  - user_status: 1.5.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - workflowengine: 2.7.0
Disabled:
  - bruteforcesettings
  - encryption
  - files_external
  - firstrunwizard: 2.10.0
  - survey_client: 1.9.0
  - suspicious_login
  - twofactor_totp

Nextcloud configuration

{
    "system": {
        "activity_use_cached_mountpoints": true,
        "config_is_read_only": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "lost_password_link": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "25.0.4.1",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "forwarded_for_headers": [
            "http_x_real_ip",
            "x-http-forwarded-for",
            "HTTP_X_FORWARDED_FOR"
        ],
        "activity_expire_days": 14,
        "auth.bruteforce.protection.enabled": false,
        "blacklisted_files": [
            ".htaccess",
            "Thumbs.db",
            "thumbs.db"
        ],
        "cron_log": true,
        "default_phone_region": "DE",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\HEIC"
        ],
        "filesystem_check_changes": 0,
        "filelocking.enabled": "true",
        "htaccess.RewriteBase": "\/",
        "integrity.check.disabled": false,
        "knowledgebaseenabled": false,
        "logfile": "\/var\/nc_data\/nextcloud.log",
        "loglevel": 2,
        "logtimezone": "Europe\/Berlin",
        "default_language": "de_DE",
        "log_rotate_size": 104857600,
        "maintenance": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "preview_max_memory": 256,
        "preview_max_x": 1024,
        "preview_max_y": 768,
        "preview_max_scale_factor": 1,
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "quota_include_external_storage": false,
        "share_folder": "\/Freigaben",
        "skeletondirectory": "\/var\/nc_data\/skeleton",
        "theme": "",
        "trashbin_retention_obligation": "auto, 90",
        "versions_retention_obligation": "auto, 60",
        "updater.release.channel": "stable",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "mail_smtpmode": "smtp",
        "mail_smtpport": "587",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls"
    }
}

Web server error log

No response

Log file

No response

Browser log

No response

Additional info

Without the LDAP Provider involved, you can search like this above mentioned, but on all instances with a LDAP Provider this doesn't work.

ChristophWurst commented 1 year ago

I can not reproduce on a production system that uses LDAP as well

AmatorPhasma commented 1 year ago

I can not reproduce on a production system that uses LDAP as well

strange.. I have this behavior on three separate instances with LDAP provider and only in the calendar app, if it's just me then something must be misconfigured on our side...

This is one of the LDAP configurations:

+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Configuration                 | s01                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| homeFolderNamingRule          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| lastJpegPhotoLookup           | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ldapAgentName                 | CN=nextcloud,OU=Service Accounts,DC=intranet,DC=***,DC=de                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ldapAgentPassword             | ***                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ldapAttributesForGroupSearch  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapAttributesForUserSearch   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapBackupHost                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapBackupPort                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapBase                      | dc=intranet,DC=***,dc=de                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ldapBaseGroups                | dc=intranet,DC=***,dc=de                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ldapBaseUsers                 | dc=intranet,DC=***,dc=de                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ldapCacheTTL                  | 600                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ldapConfigurationActive       | 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ldapConnectionTimeout         | 15                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ldapDefaultPPolicyDN          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapDynamicGroupMemberURL     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapEmailAttribute            | mail                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ldapExperiencedAdmin          | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ldapExpertUUIDGroupAttr       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapExpertUUIDUserAttr        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapExpertUsernameAttr        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapExtStorageHomeAttribute   |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapGidNumber                 | ldapGidNumber                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ldapGroupDisplayName          | cn                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ldapGroupFilter               | (&(|(objectclass=group))(|(cn=***)(cn=***)(cn=***)(cn=***)(cn=***)(cn=***)... )) |
| ldapGroupFilterGroups         | ***;***;***;***;***;***;***;***;***;***;***;***;***;***;..                                                                                                                                                                  |
| ldapGroupFilterMode           | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ldapGroupFilterObjectclass    | group                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ldapGroupMemberAssocAttr      | member                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ldapHost                      | ldaps://ldap.intranet.***.de                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ldapIgnoreNamingRules         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapLoginFilter               | (&(&(|(objectclass=organizationalPerson)(objectclass=person))(|(|(memberof=CN=Nextcloud Access Control Group,OU=Nextcloud,OU=Service Groups,DC=intranet,DC=***,DC=de)(primaryGroupID=1111))))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))))                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ldapLoginFilterAttributes     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapLoginFilterEmail          | 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ldapLoginFilterMode           | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ldapLoginFilterUsername       | 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ldapMatchingRuleInChainState  | unknown                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ldapNestedGroups              | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ldapOverrideMainServer        |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapPagingSize                | 500                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ldapPort                      | 636                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ldapQuotaAttribute            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapQuotaDefault              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapTLS                       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ldapUserAvatarRule            | default                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ldapUserDisplayName           | displayName                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ldapUserDisplayName2          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ldapUserFilter                | (&(|(objectclass=organizationalPerson)(objectclass=person))(|(|(memberof=CN=Nextcloud Access Control Group,OU=Nextcloud,OU=Service Groups,DC=intranet,DC=***,DC=de)(primaryGroupID=1111))))                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ldapUserFilterGroups          | Nextcloud Access Control Group                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ldapUserFilterMode            | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ldapUserFilterObjectclass     | organizationalPerson;person                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| ldapUuidGroupAttribute        | auto                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ldapUuidUserAttribute         | auto                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| turnOffCertCheck              | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| turnOnPasswordChange          | 0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| useMemberOfToDetectMembership | 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
+-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

All have in common that the ldap service comes from a SAMBA AD 17.x

AmatorPhasma commented 1 year ago

Additional "funny" fact: If I search with a wildcard ist works... 001

ChristophWurst commented 1 year ago

Is sharing restricted in any way? The sharing settings do have influence on share autocomplete dialogues

AmatorPhasma commented 1 year ago

Is sharing restricted in any way? The sharing settings do have influence on share autocomplete dialogues

Thanks for the tip, but the sharing isn't restricted, so it shouldn't the root cause...

The settings on the nextcloud are the following: 002

This are the same on the instances without a LDAP Provider.