Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 1 of urldecode cannot be null, possibly null value provided
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