Skip to content

[Bug]: External storage will prompt for password but always tell you it's the wrong password #51919

@cmdrscotty

Description

@cmdrscotty

⚠️ This issue respects the following points: ⚠️

Bug description

Similar to (#51637) when trying to add/edit external storage or save global creds it will prompt for password but always tell you it's the wrong password.
This is specifically for using the Default user management backend (no LDAP, ODIC, etc...)

Steps to reproduce

  1. Log into NC as an admin
  2. go to External Storage administration
  3. attempt to either create a new external storage and save it, or edit an existing one and save it, or update global creds
  4. system will give password box to prompt for your password to confirm
  5. entering the correct password will give the error it's incorrect

*note doesn't matter if you've been logged in for 5 seconds or 5 minutes, it always will request re-authentication

Expected behavior

It should correctly validate the password against the database and save the settings.

Nextcloud Server version

30

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MySQL

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

Updated from a MINOR version (ex. 32.0.1 to 32.0.2)

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": [
            "nas.commanderscotty.com",
            "192.168.2.252"
        ],
        "auto_logout": true,
        "session_keepalive": true,
        "session.cookie_lifetime": 900,
        "default_phone_region": "US",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.8.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "filesystem_check_changes": 1,
        "filelocking.enabled": false,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_smtpauth": 1,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance_window_start": 1,
        "maintenance": false,
        "defaultapp": "files",
        "overwrite.cli.url": "https:\/\/nas.commanderscotty.com",
        "overwriteprotocol": "https",
        "theme": "",
        "loglevel": 2,
        "default_language": "en",
        "default_locale": "en_US",
        "default_timezone": "America\/Phoenix",
        "memories.exiftool": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.path": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "enabledPreviewProviders": [
            "OC\\Preview\\Movie",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\Image"
        ],
        "preview_max_x": 1024,
        "preview_max_y": 1024,
        "preview_max_memory": 2048,
        "updater.release.channel": "stable"
    }
}

List of activated Apps

Enabled:
  - activity: 3.0.0
  - announcementcenter: 7.1.0
  - audioplayer: 3.4.1
  - bruteforcesettings: 3.0.0
  - calendar: 5.2.0
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - contacts: 7.0.4
  - contactsinteraction: 1.11.0
  - dashboard: 7.10.0
  - dav: 1.31.1
  - external: 5.5.2
  - 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
  - impersonate: 1.17.1
  - integration_github: 3.1.1
  - integration_google: 3.2.0
  - integration_youtube: 0.3.1
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - mail: 4.3.2
  - memegen: 1.1.1
  - memories: 7.5.2
  - nextcloud_announcements: 2.0.0
  - notes: 4.11.0
  - notifications: 3.0.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - passwords: 2025.2.20
  - photos: 3.0.2
  - previewgenerator: 5.8.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
  - socialsharing_email: 3.3.0
  - spreed: 20.1.5
  - support: 2.0.0
  - survey_client: 2.0.0
  - systemtags: 1.20.0
  - text: 4.1.0
  - theming: 2.6.0
  - twofactor_backupcodes: 1.19.0
  - updatenotification: 1.20.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
  - app_api: 4.0.6 (installed 2.7.0)
  - assistant: 2.4.0 (installed 2.4.0)
  - duplicatefinder: 1.6.1 (installed 1.6.1)
  - encryption: 2.18.0
  - google_synchronization: 3.0.0 (installed 3.0.0)
  - integration_giphy: 2.0.1 (installed 2.0.1)
  - integration_openai: 3.5.0 (installed 3.5.0)
  - integration_reddit: 2.0.5 (installed 2.0.5)
  - maps: 1.5.0 (installed 1.5.0)
  - music: 2.1.2 (installed 2.1.2)
  - phonetrack: 0.8.2 (installed 0.8.2)
  - suspicious_login: 8.0.0
  - twofactor_nextcloud_notification: 4.0.0
  - twofactor_totp: 12.0.0-dev
  - user_ldap: 1.21.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"eS3eC7HeNMq2TJQCUrn7","level":3,"time":"2025-04-03T14:45:04+00:00","remoteAddr":"192.168.2.5","user":"kenneth","app":"PHP","method":"POST","url":"/index.php/apps/files_external/globalstorages","message":"Undefined array key 1 at /var/www/nextcloud/lib/private/AppFramework/Middleware/Security/PasswordConfirmationMiddleware.php#82","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 OPR/117.0.0.0","version":"30.0.8.1","data":{"app":"PHP"}}
{"reqId":"eS3eC7HeNMq2TJQCUrn7","level":2,"time":"2025-04-03T14:45:05+00:00","remoteAddr":"192.168.2.5","user":"kenneth","app":"core","method":"POST","url":"/index.php/apps/files_external/globalstorages","message":"Login failed: 'kenneth' (Remote IP: '192.168.2.5')","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 OPR/117.0.0.0","version":"30.0.8.1","data":{"app":"core"}}

Additional info

Browser console log when trying to enter password at prompt

        
       
       POST https://nas.commanderscotty.com/index.php/apps/files_external/globalcredentials 403 (Forbidden)
(anonymous) @ xhr.js:195
xhr @ xhr.js:15
f @ dispatchRequest.js:51
Promise.then
_request @ Axios.js:163
request @ Axios.js:40
(anonymous) @ bind.js:5
(anonymous) @ settings.js:1529
dispatch @ jquery.js:5145
g.handle @ jquery.js:4949```

Metadata

Metadata

Assignees

Labels

0. Needs triagePending check for reproducibility or if it fits our roadmap30-feedbackbug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions