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]: Failed to DELETE LDAP provisioned user, error code is 400. #50834

Open
5 of 8 tasks
zcchen opened this issue Feb 15, 2025 · 0 comments
Open
5 of 8 tasks

[Bug]: Failed to DELETE LDAP provisioned user, error code is 400. #50834

zcchen opened this issue Feb 15, 2025 · 0 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 30-feedback bug

Comments

@zcchen
Copy link

zcchen commented Feb 15, 2025

⚠️ This issue respects the following points: ⚠️

Bug description

Failed to delete the user provisioned by LDAP. The DELETE action return 400 HTML error code.

[15/Feb/2025:09:11:49 +0000] "POST /login/confirm HTTP/1.0" 200 875 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
[15/Feb/2025:09:11:51 +0000] "DELETE /ocs/v2.php/cloud/users/<username> HTTP/1.0" 400 794 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"

Steps to reproduce

  1. Setup the basic environment.
    a. Setup basic docker-compose solution and environment. https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/insecure/postgres/apache/compose.yaml
    b. Setup the LDAP environment. I choose LLDAP solution. https://github.com/lldap/lldap
  2. Setup user_ldap plugin as documentation.

I used the user for LDAP connection.

  1. Setup user_ldap with some expert Config:
php occ ldap:set-config s01 ldapExpertUsernameAttr "uid"
php occ ldap:set-config s01 ldapExpertUUIDUserAttr "uid"
php occ ldap:set-config s01 ldapExpertUUIDGroupAttr "cn"
  1. Login and provision the testuser user.
    a. Everything should be OK.
    b. /var/www/html/data/<testuser>/ folder should be created, because of the No. 3 settings.
  2. Logout and re-login as admin.
  3. Go to account page and try to delete user.

Error message can be found at docker logs.

  1. If plugin user_ldap is disabled, the user can be deleted normally.

Expected behavior

  1. No HTML error code returned.
  2. can be delete normally in Nextcloud Server, as well as its data.
  3. will be kept as before in LDAP server.

Nextcloud Server version

30

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

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

None

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": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwriteprotocol": "https",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "maintenance_window_start": 1,
        "default_locale": "zh_CN",
        "default_phone_region": "zh_CN",
        "logtimezone": "Asia\/Shanghai",
        "defaultapp": "files",
        "allow_local_remote_servers": true,
        "proxy": "http:\/\/myproxy.ltd",
        "proxyuserpwd": "***REMOVED SENSITIVE VALUE***",
        "proxyexclude": [
            "172.31.101.0\/24",
        ],
        "enabledPreviewProviders": [
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\Krita",
            "OC\\Preview\\Imaginary",
            "OC\\Preview\\ImaginaryPDF"
        ],
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": 1024,
        "preview_max_y": 1024,
        "upgrade.disable-web": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "mynas.balabala.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.5.1",
        "overwrite.cli.url": "https:\/\/localhost",
        "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***",
        "skeletondirectory": "\/var\/www\/skeleton",
        "templatedirectory": "",
        "no_unsupported_browser_warning": true,
        "maintenance": false,
        "appstoreenabled": true,
        "appstoreurl": "https:\/\/www.orcy.net\/ncapps\/v1\/",
        "memories.db.triggers.fcu": true,
        "memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-amd64",
        "debug": true,
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "CONFIGS__MAINTENACE_WINDOW_START": "1",
        "CONFIGS__TIMEZONE": "Asia\/Shanghai",
        "CONFIGS__DEFAULT_LOCALE": "zh_CN",
        "CONFIGS__DEFAULT_APP": "files"
    }
}

List of activated Apps

Enabled:
  - activity: 3.0.0
  - app_api: 4.0.5
  - bruteforcesettings: 3.0.0
  - calendar: 5.0.1
  - checksum: 1.2.5
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - 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_external: 1.22.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
  - firstrunwizard: 3.0.0
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - memories: 7.4.1
  - metadata: 0.21.0
  - nextcloud_announcements: 2.0.0
  - notifications: 3.0.0
  - oauth2: 1.18.1
  - onlyoffice: 9.4.0
  - password_policy: 2.0.0
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - support: 2.0.0
  - survey_client: 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_ldap: 1.21.0
  - user_oidc: 6.1.0
  - 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:
  - admin_audit: 1.20.0
  - encryption: 2.18.0
  - photos: 3.0.2 (installed 3.0.2)
  - suspicious_login: 8.0.0
  - twofactor_nextcloud_notification: 4.0.0
  - twofactor_totp: 12.0.0-dev

>- Note

Nextcloud Signing status

Nextcloud Logs

No related logs. Only Some internal network connection issues.

Additional info

No response

@zcchen zcchen added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 30-feedback bug
Projects
None yet
Development

No branches or pull requests

2 participants