Skip to content

[Bug]: Encryption private key password update form submits empty passwords because NcPasswordField values are not bound (Vue-related) #62628

Description

@rayfun

⚠️ This issue respects the following points: ⚠️

Bug description

The personal encryption settings form for updating the private key password does not work.

Entering the old private key password and the current login password and submitting the form appears to have no effect. The private key is not updated.

The password values entered into the two NcPasswordField components are not assigned to the refs used by the submit handler.

In:

apps/encryption/src/components/SettingsPersonalChangePrivateKey.vue

the refs are declared:

const oldPrivateKeyPassword = ref('')
const newPrivateKeyPassword = ref('')

and later submitted:

await axios.post(generateUrl('/apps/encryption/ajax/updatePrivateKeyPassword'), {
	oldPassword: oldPrivateKeyPassword.value,
	newPassword: newPrivateKeyPassword.value,
})

However, the corresponding fields are currently not bound to those refs:

<NcPasswordField :label="t('encryption', 'Old log-in password')" />
<NcPasswordField :label="t('encryption', 'Current log-in password')" />

As a result, both submitted values remain empty strings.

Steps to reproduce

  1. Enable the server-side encryption app in per-user key mode.
  2. Create a user and allow Nextcloud to generate the user's private key.
  3. Change the user's login password outside the normal password-change flow so that the private key remains encrypted with the old password.
  4. Log in with the current login password.
  5. Open: Personal settings → Security → Basic encryption module
  6. Enter: the old password that can decrypt the private key;
    the current valid Nextcloud login password.
  7. Submit the form.

Expected behavior

The entered passwords should be passed to the backend endpoint, allowing the existing private key to be decrypted with the old password and re-encrypted with the current login password.

The fields should be bound using v-model:

<NcPasswordField
	v-model="oldPrivateKeyPassword"
	:label="t('encryption', 'Old log-in password')" />

<NcPasswordField
	v-model="newPrivateKeyPassword"
	:label="t('encryption', 'Current log-in password')" />

Optionally, the submit button could also be disabled while either field is empty:

<NcButton
	type="submit"
	variant="primary"
	:disabled="isLoading || !oldPrivateKeyPassword || !newPrivateKeyPassword">
	{{ t('encryption', 'Update') }}
</NcButton>

Nextcloud Server version

34

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 Enabled

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": [
            "cloud.example.de",
            "cloud.example.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cloud.example.de\/",
        "dbtype": "pgsql",
        "version": "34.0.2.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "htaccess.RewriteBase": "\/",
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "updater.release.channel": "stable",
        "defaultapp": "apporder",
        "maintenance": false,
        "maintenance_window_start": 1,
        "theme": "",
        "loglevel": 2,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpsecure": "tls",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "app_install_overwrite": [
            "calendar",
            "radio",
            "tasks",
            "weather",
            "news"
        ],
        "debug": false,
        "allowNightlyUpdates": [],
        "encryption.legacy_format_support": false,
        "default_phone_region": "DE",
        "mail_sendmailmode": "smtp",
        "memories.db.triggers.fcu": true,
        "memories.exiftool": "\/var\/www\/html\/nextcloud\/apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.path": "\/var\/www\/html\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "config_preset": 2,
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 7.0.0
  - admin_audit: 1.24.0
  - appstore: 1.0.0
  - assistant: 3.5.0
  - calendar: 6.5.2
  - cloud_federation_api: 1.18.0
  - comments: 1.24.0
  - contacts: 8.7.5
  - contactsinteraction: 1.15.0
  - dashboard: 7.14.0
  - dav: 1.39.0
  - encryption: 2.22.0
  - federatedfilesharing: 1.24.0
  - federation: 1.24.0
  - files: 2.6.0
  - files_downloadlimit: 5.2.0
  - files_external: 1.26.0
  - files_lock: 34.0.1
  - files_pdfviewer: 7.0.0-dev.0
  - files_reminders: 1.7.0
  - files_sharing: 1.26.0
  - files_versions: 1.27.0
  - guests: 4.8.0
  - logreader: 7.0.0
  - lookup_server_connector: 1.22.0
  - news: 28.6.0
  - nextcloud_announcements: 6.0.0
  - notifications: 7.0.0-dev.1
  - oauth2: 1.22.0
  - office: 1.0.0
  - password_policy: 6.0.0-dev.0
  - photos: 7.0.0
  - polls: 9.1.4
  - privacy: 6.0.0-dev.1
  - profile: 1.3.0
  - provisioning_api: 1.24.0
  - related_resources: 5.0.0-dev.0
  - serverinfo: 6.0.0
  - settings: 1.17.0
  - sharebymail: 1.24.0
  - support: 6.0.0
  - survey_client: 6.0.0-dev.0
  - systemtags: 1.24.0
  - tasks: 0.18.1
  - text: 8.0.0
  - theming: 2.9.0
  - twofactor_backupcodes: 1.23.0
  - twofactor_totp: 16.0.0
  - twofactor_webauthn: 2.7.0
  - updatenotification: 1.24.0
  - user_status: 1.14.0
  - viewer: 7.0.0-dev.0
  - weather_status: 1.14.0
  - webhook_listeners: 1.6.0
  - workflowengine: 2.16.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"WXlErJHqyColDz1kCwUn","level":2,"time":"2026-07-28T18:57:44+00:00","remoteAddr":"2a02:3037:31a:5fbe:77dc:d8ca:5c82:df78","user":"axel","app":"core","method":"POST","url":"/apps/encryption/ajax/updatePrivateKeyPassword","scriptName":"/index.php","message":"Login failed: 'axel' (Remote IP: '2a02:3037:31a:5fbe:77dc:d8ca:5c82:df78')","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0","version":"34.0.2.1","data":{"app":"core"}}

Additional info

{
"log": {
"version": "1.2",
"creator": {
"name": "Firefox",
"version": "153.0"
},
"browser": {
"name": "Firefox",
"version": "153.0"
},
"pages": [
{
"id": "page_1",
"pageTimings": {
"onContentLoad": -26391,
"onLoad": -25376
},
"startedDateTime": "2026-07-28T20:57:43.195+02:00",
"title": "https://cloud.example.de/settings/user/security"
}
],
"entries": [
{
"startedDateTime": "2026-07-28T20:57:43.195+02:00",
"request": {
"bodySize": 35,
"method": "POST",
"url": "https://cloud.example.de/apps/encryption/ajax/updatePrivateKeyPassword",
"httpVersion": "HTTP/2",
"headers": [
{
"name": "Host",
"value": "cloud.example.de"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (X11; Linux x86_64; rv:153.0) Gecko/20100101 Firefox/153.0"
},
{
"name": "Accept",
"value": "application/json, text/plain, /"
},
{
"name": "Accept-Language",
"value": "en-US,en;q=0.5"
},
{
"name": "Accept-Encoding",
"value": "gzip, deflate, br, zstd"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Content-Length",
"value": "35"
},
{
"name": "X-Requested-With",
"value": "XMLHttpRequest, XMLHttpRequest"
},
{
"name": "requesttoken",
"value": "7mnZnRGarVlbQdu/4LzyujIyswhwFZ5PQQkJ/03TEH0=:iyqzzWL8ng8WF4nXjN7BiWV/hG9AYqw/eDk7swGJaE4="
},
{
"name": "Origin",
"value": "https://cloud.example.de"
},
{
"name": "DNT",
"value": "1"
},
{
"name": "Sec-GPC",
"value": "1"
},
{
"name": "Sec-Fetch-Dest",
"value": "empty"
},
{
"name": "Sec-Fetch-Mode",
"value": "cors"
},
{
"name": "Sec-Fetch-Site",
"value": "same-origin"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Cookie",
"value": "__Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; nc_username=axel; nc_token=4zcCbEIUhkmuK6CVQspz4QJmSnjI8hIF; nc_session_id=1dvale813ip5ea1ghla0dso7la; oc_sessionPassphrase=XTFbQoLvTFrxaL39BrX4mAVKUVNVyHZCMzyeBqC43CJDCViPyaNcvDmQK%2FP73LVc6FmAMiLF4knt9J7HYGZLAUA2HQ8e2QXvbdasGKhrNgB%2FMfDAhdDAizJZ%2BKFlmNfZ; ocbdf8qw9lwm=1dvale813ip5ea1ghla0dso7la"
},
{
"name": "Priority",
"value": "u=0"
},
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Cache-Control",
"value": "no-cache"
}
],
"cookies": [
{
"name": "__Host-nc_sameSiteCookielax",
"value": "true"
},
{
"name": "__Host-nc_sameSiteCookiestrict",
"value": "true"
},
{
"name": "nc_username",
"value": "axel"
},
{
"name": "nc_token",
"value": "4zcCbEIUhkmuK6CVQspz4QJmSnjI8hIF"
},
{
"name": "nc_session_id",
"value": "1dvale813ip5ea1ghla0dso7la"
},
{
"name": "oc_sessionPassphrase",
"value": "XTFbQoLvTFrxaL39BrX4mAVKUVNVyHZCMzyeBqC43CJDCViPyaNcvDmQK/P73LVc6FmAMiLF4knt9J7HYGZLAUA2HQ8e2QXvbdasGKhrNgB/MfDAhdDAizJZ+KFlmNfZ"
},
{
"name": "ocbdf8qw9lwm",
"value": "1dvale813ip5ea1ghla0dso7la"
}
],
"queryString": [],
"headersSize": 1091,
"postData": {
"mimeType": "application/json",
"params": [],
"text": "{"oldPassword":"","newPassword":""}"
}
},
"response": {
"status": 400,
"statusText": "",
"httpVersion": "HTTP/2",
"headers": [
{
"name": "x-request-id",
"value": "WXlErJHqyColDz1kCwUn"
},
{
"name": "cache-control",
"value": "no-cache, no-store, must-revalidate"
},
{
"name": "content-security-policy",
"value": "default-src 'none';base-uri 'none';manifest-src 'self';frame-ancestors 'none'"
},
{
"name": "feature-policy",
"value": "autoplay 'none';camera 'none';fullscreen 'none';geolocation 'none';microphone 'none';payment 'none'"
},
{
"name": "x-robots-tag",
"value": "noindex, nofollow"
},
{
"name": "x-user-id",
"value": "axel"
},
{
"name": "set-cookie",
"value": "ocbdf8qw9lwm=1dvale813ip5ea1ghla0dso7la; path=/; secure; HttpOnly; SameSite=Lax"
},
{
"name": "strict-transport-security",
"value": "max-age=15552000; includeSubDomains"
},
{
"name": "x-content-type-options",
"value": "nosniff"
},
{
"name": "x-frame-options",
"value": "SAMEORIGIN"
},
{
"name": "x-permitted-cross-domain-policies",
"value": "none"
},
{
"name": "referrer-policy",
"value": "no-referrer"
},
{
"name": "content-length",
"value": "76"
},
{
"name": "content-type",
"value": "application/json; charset=utf-8"
},
{
"name": "date",
"value": "Tue, 28 Jul 2026 18:57:43 GMT"
},
{
"name": "server",
"value": "Apache/2.4.63"
},
{
"name": "X-Firefox-Spdy",
"value": "h2"
}
],
"cookies": [
{
"name": "ocbdf8qw9lwm",
"value": "1dvale813ip5ea1ghla0dso7la"
}
],
"content": {
"mimeType": "application/json; charset=utf-8",
"size": 76,
"text": "{"message":"The current log-in password was not correct, please try again."}"
},
"redirectURL": "",
"headersSize": 811,
"bodySize": 887
},
"cache": {},
"timings": {
"blocked": 0,
"dns": 0,
"connect": 46,
"ssl": 58,
"send": 0,
"wait": 951,
"receive": 0
},
"time": 1055,
"_securityState": "secure",
"_priority": "Highest",
"serverIPAddress": "2a01:4f8:251:56b::2",
"connection": "443",
"pageref": "page_1"
}
]
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions