nextcloud / nextcloud/server

[Bug]: Integrity constraint violation: 1062 Duplicate entry for key user_ldap_membership_unique

Open
#43,496 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 28-feedback bug feature: ldap
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

So I have upgrade to latest 28.02 versin using occ upgrade. Everything is working fine but received some popup from time to time saying that an administrator remove my user from an ldap group.
Now checking in the logs

DbalException An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'interne-romain.pelissier' for key 'user_ldap_membership_unique'

I am using groups and users from an openldap server and the ldap connection is/was working fine so far.
The issue happen after the update to 28.02

I see some references to this issue here https://github.com/nextcloud/server/pull/42576 and https://github.com/nextcloud/server/issues/42482 but not sure it really apply and cannot found a fix for this.

Steps to reproduce
  1. Have nextcloud 27.x using openldap and mysql db working
  2. Upgrade to 24.02 using the occ command
Expected behavior

We should not have this duplicate entry issue

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

RHEL/CentOS

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

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

Upgraded to a MAJOR version (ex. 22 to 23)

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
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "192.168.6.8",
            "cloud.digitalrat.org"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "cloud.digitalrat.org",
        "overwriteprotocol": "https",
        "overwrite.cli.url": "https:\/\/cloud.digitalrat.org\/",
        "htaccess.RewriteBase": "\/",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.2.5",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "filelocking.enabled": true,
        "updater.release.channel": "stable",
        "mysql.utf8mb4": true,
        "mail_sendmailmode": "smtp",
        "app_install_overwrite": [
            "twofactor_email"
        ],
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "Utilisateurs"
        ],
        "twofactor_enforced_excluded_groups": [],
        "encryption.legacy_format_support": false,
        "encryption.key_storage_migrated": false,
        "default_phone_region": "CA",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "timeout": 1.5
        },
        "maintenance_window_start": 1
    }
}
List of activated Apps
Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - calendar: 4.6.4
  - circles: 28.0.0-dev
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.1
  - contactsinteraction: 1.9.0
  - cookbook: 0.11.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - deck: 1.12.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_external: 1.20.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - groupfolders: 16.0.3
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notes: 4.9.2
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - richdocuments: 8.3.1
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.0
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - tasks: 0.15.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - twofactor_email: 2.7.4
  - twofactor_nextcloud_notification: 3.8.0
  - twofactor_totp: 10.0.0-beta.2
  - updatenotification: 1.18.0
  - user_ldap: 1.19.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - bruteforcesettings: 2.8.0 (installed 1.0.3)
  - encryption: 2.16.0 (installed 2.8.1)
  - files_antivirus: 5.4.1 (installed 5.4.1)
  - files_markdown: 2.4.1 (installed 2.4.1)
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - ocr: 6.0.58 (installed 6.0.58)
  - suspicious_login: 6.0.0
  - twofactor_gateway: 0.20.0 (installed 0.20.0)
  - unsplash: 2.2.1 (installed 2.2.1)
Nextcloud Signing status
No errors have been found
Nextcloud Logs
{"reqId":"ZcQo7LNEtNtamhQm@rvEpAAAAFM","level":3,"time":"2024-02-08T01:05:49+00:00","remoteAddr":"192.168.7.30","user":"romain.pelissier","app":"no app in context","method":"PUT","url":"/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json","message":"Exception thrown: OC\\DB\\Exceptions\\DbalException","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0","version":"28.0.2.5","exception":{"Exception":"OC\\DB\\Exceptions\\DbalException","Message":"An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'interne-romain.pelissier' for key 'user_ldap_membership_unique'","Code":1062,"Trace":[{"file":"/www/html/prod/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":328,"function":"wrap","class":"OC\\DB\\Exceptions\\DbalException","type":"::"},{"file":"/www/html/prod/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":137,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":95,"function":"insert","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":67,"function":"updateGroups","class":"OCA\\User_LDAP\\LoginListener","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":55,"function":"onPostLogin","class":"OCA\\User_LDAP\\LoginListener","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\User_LDAP\\LoginListener","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":392,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":667,"function":"completeLogin","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":868,"function":"loginWithToken","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/lib/base.php","line":1145,"function":"tryTokenLogin","class":"OC\\User\\Session","type":"->"},{"file":"/www/html/prod/nextcloud/ocs/v1.php","line":62,"function":"handleLogin","class":"OC","type":"::"},{"file":"/www/html/prod/nextcloud/ocs/v2.php","line":23,"args":["/www/html/prod/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/www/html/prod/nextcloud/lib/private/DB/Exceptions/DbalException.php","Line":71,"Previous":{"Exception":"Doctrine\\DBAL\\Exception\\UniqueConstraintViolationException","Message":"An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'interne-romain.pelissier' for key 'user_ldap_membership_unique'","Code":1062,"Trace":[{"file":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1938,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1880,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1208,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":326,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/www/html/prod/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":137,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":95,"function":"insert","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":67,"function":"updateGroups","class":"OCA\\User_LDAP\\LoginListener","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":55,"function":"onPostLogin","class":"OCA\\User_LDAP\\LoginListener","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\User_LDAP\\LoginListener","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":392,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":667,"function":"completeLogin","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":868,"function":"loginWithToken","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/lib/base.php","line":1145,"function":"tryTokenLogin","class":"OC\\User\\Session","type":"->"},{"file":"/www/html/prod/nextcloud/ocs/v1.php","line":62,"function":"handleLogin","class":"OC","type":"::"},{"file":"/www/html/prod/nextcloud/ocs/v2.php","line":23,"args":["/www/html/prod/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":62,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'interne-romain.pelissier' for key 'user_ldap_membership_unique'","Code":1062,"Trace":[{"file":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":132,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::"},{"file":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1202,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":326,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/www/html/prod/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":137,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":95,"function":"insert","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":67,"function":"updateGroups","class":"OCA\\User_LDAP\\LoginListener","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":55,"function":"onPostLogin","class":"OCA\\User_LDAP\\LoginListener","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\User_LDAP\\LoginListener","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":392,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":667,"function":"completeLogin","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":868,"function":"loginWithToken","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/lib/base.php","line":1145,"function":"tryTokenLogin","class":"OC\\User\\Session","type":"->"},{"file":"/www/html/prod/nextcloud/ocs/v1.php","line":62,"function":"handleLogin","class":"OC","type":"::"},{"file":"/www/html/prod/nextcloud/ocs/v2.php","line":23,"args":["/www/html/prod/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":28,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'interne-romain.pelissier' for key 'user_ldap_membership_unique'","Code":"23000","Trace":[{"file":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":130,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1202,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/DB/Connection.php","line":294,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":386,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":326,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/www/html/prod/nextcloud/lib/public/AppFramework/Db/QBMapper.php","line":137,"function":"executeStatement","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":95,"function":"insert","class":"OCP\\AppFramework\\Db\\QBMapper","type":"->"},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":67,"function":"updateGroups","class":"OCA\\User_LDAP\\LoginListener","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/apps/user_ldap/lib/LoginListener.php","line":55,"function":"onPostLogin","class":"OCA\\User_LDAP\\LoginListener","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\User_LDAP\\LoginListener","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/www/html/prod/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":392,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":667,"function":"completeLogin","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/lib/private/User/Session.php","line":868,"function":"loginWithToken","class":"OC\\User\\Session","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/www/html/prod/nextcloud/lib/base.php","line":1145,"function":"tryTokenLogin","class":"OC\\User\\Session","type":"->"},{"file":"/www/html/prod/nextcloud/ocs/v1.php","line":62,"function":"handleLogin","class":"OC","type":"::"},{"file":"/www/html/prod/nextcloud/ocs/v2.php","line":23,"args":["/www/html/prod/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/www/html/prod/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":130}}},"CustomMessage":"Exception thrown: OC\\DB\\Exceptions\\DbalException"},"id":"65c6a70fa6143"}
Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The failure path is in apps/user_ldap/lib/LoginListener.php, especially onPostLogin, updateGroups, and the insert at line 95; start by tracing how LDAP memberships are read and written during login. Reproduce the upgrade scenario with LDAP and MariaDB, then verify that repeated login or group updates no longer trigger user_ldap_membership_unique and that membership state remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
mariadb, php
Domain
authentication, backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.