diff options
author | skjnldsv <skjnldsv@protonmail.com> | 2024-11-12 12:45:16 +0100 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2024-11-12 22:38:40 +0000 |
commit | bfe8f8af40d82cb092e652bc4b906aaeb33ab732 (patch) | |
tree | 0a1450e4567d9e7d995bef7a0dcec5cea0a7c44a /apps/files_sharing/src | |
parent | de1c175d39f2513f3a99e393c9ea70175e43ae10 (diff) | |
download | nextcloud-server-bfe8f8af40d82cb092e652bc4b906aaeb33ab732.tar.gz nextcloud-server-bfe8f8af40d82cb092e652bc4b906aaeb33ab732.zip |
fix(dav): file request guest nickname encoding
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r-- | apps/files_sharing/src/public-file-request.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/files_sharing/src/public-file-request.ts b/apps/files_sharing/src/public-file-request.ts index 92db2440525..1d640c5ea5e 100644 --- a/apps/files_sharing/src/public-file-request.ts +++ b/apps/files_sharing/src/public-file-request.ts @@ -3,12 +3,13 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +import { defineAsyncComponent } from 'vue' +import { getBuilder } from '@nextcloud/browser-storage' import { getGuestNickname, setGuestNickname } from '@nextcloud/auth' -import { spawnDialog } from '@nextcloud/dialogs' import { getUploader } from '@nextcloud/upload' -import { defineAsyncComponent } from 'vue' +import { spawnDialog } from '@nextcloud/dialogs' + import logger from './services/logger' -import { getBuilder } from '@nextcloud/browser-storage' const storage = getBuilder('files_sharing').build() @@ -18,7 +19,7 @@ const storage = getBuilder('files_sharing').build() */ function registerFileRequestHeader(nickname: string) { const uploader = getUploader() - uploader.setCustomHeader('X-NC-Nickname', nickname) + uploader.setCustomHeader('X-NC-Nickname', encodeURIComponent(nickname)) logger.debug('Nickname header registered for uploader', { headers: uploader.customHeaders }) } |