Skip to content

[Bug]: External file shares are not created with user provided passwords. #54398

@Darianisak

Description

@Darianisak

⚠️ This issue respects the following points: ⚠️

Bug description

At the time of writing, user provided passwords for external file shares are discarded in favor of the system generated one.

This appears to be because the Vue component is no longer syncing against the correct attribute of the Share model.

I will raise a PR with a fix for this bug.

Steps to reproduce

  1. Under a files "External Shares", click "Create public link"
  2. Supply a password to the password field, e.g., "testing-password_123"
  3. Click "Create share"
  4. Attempt to navigate to the generated share link and access the file with the password you provided at the time of creating the share.
  5. The provided password will be rejected, as it was never updated the system generated one.

The use of the system password is especially clear if:

  • Creating the file share with the browser console open.
  • Vue is using development webpack bundles.

Expected behavior

Assuming compliance with any relevant password policies, passwords provided by users to the file share creation dialog should be used in favor of the system generated password.

I.e., users should be able to access an external file share with the password that they defined, not one that the system defined.

Nextcloud Server version

31

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

PostgreSQL

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": {
        "installed": true,
        "version": "31.0.7.1",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            }
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "dbtype": "pgsql",
        "overwrite.cli.url": "http:\/\/localhost",
        "overwriteprotocol": "https",
        "dbport": "",
        "dbtableprefix": "oc_",
        "updater.release.channel": "git",
        "upgrade.disable-web": true,
        "appstoreenabled": false,
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "objectstore": {
            "class": "OC\\Files\\ObjectStore\\Swift",
            "arguments": {
                "autocreate": false,
                "user": {
                    "name": "***REMOVED SENSITIVE VALUE***",
                    "password": "***REMOVED SENSITIVE VALUE***",
                    "domain": {
                        "name": "Default"
                    }
                },
                "scope": {
                    "project": {
                        "name": "***REMOVED SENSITIVE VALUE***",
                        "domain": {
                            "name": "Default"
                        }
                    }
                },
                "serviceName": "swift",
                "region": "***REMOVED SENSITIVE VALUE***",
                "url": "***REMOVED SENSITIVE VALUE***",
                "bucket": "***REMOVED SENSITIVE VALUE***"
            }
        },
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "password": "***REMOVED SENSITIVE VALUE***"
        }
    }
}

List of activated Apps

Enabled:
  - activity: 4.0.0
  - admin_audit: 1.21.0
  - app_api: 5.0.2
  - bruteforcesettings: 4.0.0
  - comments: 1.21.0
  - dav: 1.33.0
  - federatedfilesharing: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_pdfviewer: 4.0.0
  - files_sharing: 1.23.1
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - oauth2: 1.19.1
  - password_policy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - systemtags: 1.21.1
  - theming: 2.6.1
  - user_oidc: 7.3.0
  - viewer: 4.0.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - cloud_federation_api: 1.14.0
  - contactsinteraction: 1.12.0
  - dashboard: 7.11.0
  - encryption: 2.19.0
  - federation: 1.21.0
  - files_external: 1.23.0
  - files_reminders: 1.4.0
  - sharebymail: 1.21.0
  - testing: 1.21.0
  - twofactor_backupcodes: 1.20.0
  - updatenotification: 1.21.0
  - user_ldap: 1.22.0
  - user_status: 1.11.0
  - weather_status: 1.11.0

Nextcloud Signing status

Integrity checker has been disabled. Integrity cannot be verified.

Nextcloud Logs

N/A

Additional info

User backend: user_oidc, for automatically provisioning users via OpenID Connect.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions