Skip to content

Commit

Permalink
Merge pull request #49239 from nextcloud/backport/49226/stable30
Browse files Browse the repository at this point in the history
  • Loading branch information
provokateurin authored Nov 13, 2024
2 parents 339f6ff + bf728f9 commit cda0a65
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/dav/lib/Files/Sharing/FilesDropPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function beforeMethod(RequestInterface $request, ResponseInterface $respo
// Extract the attributes for the file request
$isFileRequest = false;
$attributes = $this->share->getAttributes();
$nickName = $request->getHeader('X-NC-Nickname');
$nickName = $request->hasHeader('X-NC-Nickname') ? urldecode($request->getHeader('X-NC-Nickname')) : null;
if ($attributes !== null) {
$isFileRequest = $attributes->getAttribute('fileRequest', 'enabled') === true;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/files_sharing/js/files_drop.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}

if (localStorage.getItem('nick') !== null) {
data.headers['X-NC-Nickname'] = localStorage.getItem('nick')
data.headers['X-NC-Nickname'] = encodeURIComponent(localStorage.getItem('nick'))
}

$('#drop-upload-done-indicator').addClass('hidden');
Expand Down
2 changes: 1 addition & 1 deletion build/integration/features/bootstrap/FilesDropContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function droppingFileWith($path, $content, $nickName = null) {
];

if ($nickName) {
$options['headers']['X-NC-NICKNAME'] = $nickName;
$options['headers']['X-NC-NICKNAME'] = urlencode($nickName);
}

$options['body'] = \GuzzleHttp\Psr7\Utils::streamFor($content);
Expand Down

0 comments on commit cda0a65

Please sign in to comment.