From efe85baed914fd53d36e2e0bd63bed45995a7a4f Mon Sep 17 00:00:00 2001 From: Gaurav Soni Date: Mon, 26 Oct 2026 14:24:14 +0100 Subject: [PATCH] fix(web): [OCISDEV-1187] disable confirm in link password dialog when empty (#13218) The link "Add password" / "Edit password" dialog could be confirmed, by button or Enter, while the field was still empty, which removed the password from the link. Confirm now starts disabled, and Enter only confirms when the password policy is fulfilled, same as the button. Signed-off-by: Gaurav Soni --- ...ugfix-link-password-modal-empty-confirm.md | 7 ++ .../Modals/SetLinkPasswordModal.vue | 18 ++++- .../Modals/SetLinkPasswordModal.spec.ts | 68 ++++++++++++++++++- 3 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 changelog/unreleased/bugfix-link-password-modal-empty-confirm.md diff --git a/changelog/unreleased/bugfix-link-password-modal-empty-confirm.md b/changelog/unreleased/bugfix-link-password-modal-empty-confirm.md new file mode 100644 index 00000000000..ca83f7bf440 --- /dev/null +++ b/changelog/unreleased/bugfix-link-password-modal-empty-confirm.md @@ -0,0 +1,7 @@ +Bugfix: Disable confirm in the link password dialog until a password is entered + +The "Add password" / "Edit password" dialog for links could be confirmed with +an empty field, which removed the password from the link. The confirm button +is now disabled until a valid password is entered. + +https://github.com/owncloud/ocis/pull/13218 diff --git a/web/packages/web-app-files/src/components/Modals/SetLinkPasswordModal.vue b/web/packages/web-app-files/src/components/Modals/SetLinkPasswordModal.vue index f5907c5ba83..0a7d1f18830 100644 --- a/web/packages/web-app-files/src/components/Modals/SetLinkPasswordModal.vue +++ b/web/packages/web-app-files/src/components/Modals/SetLinkPasswordModal.vue @@ -10,13 +10,13 @@ class="oc-modal-body-input" @password-challenge-completed="$emit('update:confirmDisabled', false)" @password-challenge-failed="$emit('update:confirmDisabled', true)" - @keydown.enter.prevent="$emit('confirm')" + @keydown.enter.prevent="onEnter" @update:model-value="onInput" />