From e1796a57e8edd5dbc30f4e04fce1551b331a6c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Thu, 14 May 2026 23:23:49 +0200 Subject: [PATCH] fix: Fix error when creating mail shares if custom tokens are enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a new share is saved it is first created in the backend and then updated with some additional attributes set in the frontend. If custom tokens are enabled the attributes to update also include the token. However, for new shares the token is set by the backend when it is created, it is not defined by the frontend, so the token returned by the backend needs to be copied to the share data in the frontend. Otherwise the update would fail because an empty token is sent. Signed-off-by: Daniel Calviño Sánchez --- apps/files_sharing/src/views/SharingDetailsTab.vue | 3 +++ build/eslint-baseline-legacy.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index 120ff230ff2..fc145396195 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -1131,6 +1131,9 @@ export default { // ugly hack to make code work - we need the id to be set but at the same time we need to keep values we want to update this.share._share.id = share.id + // Similarly the token is always set by the backend when the + // share is created. + this.share._share.token = share.token await this.queueUpdate(...permissionsAndAttributes) // Also a ugly hack to update the updated permissions for (const prop of permissionsAndAttributes) { diff --git a/build/eslint-baseline-legacy.json b/build/eslint-baseline-legacy.json index 1240b085863..f8bffbbed26 100644 --- a/build/eslint-baseline-legacy.json +++ b/build/eslint-baseline-legacy.json @@ -16,7 +16,7 @@ }, "apps/files_sharing/src/views/SharingDetailsTab.vue": { "vue/no-mutating-props": { - "count": 23 + "count": 24 } }, "apps/files_sharing/src/views/SharingLinkList.vue": {