From 6b9d018aeb4e586bcb6c81909633ecdc4ca60f93 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 +++ 1 file changed, 3 insertions(+) diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index 7665b02f794..e7dc7086492 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -1049,6 +1049,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) {