mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 08:16:43 -04:00
fix(dav): file request guest nickname encoding
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
parent
0ac2b2b678
commit
bf728f9d51
3 changed files with 3 additions and 3 deletions
|
|
@ -64,7 +64,7 @@ class FilesDropPlugin extends ServerPlugin {
|
|||
// 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class FilesDropContext implements Context, SnippetAcceptingContext {
|
|||
];
|
||||
|
||||
if ($nickName) {
|
||||
$options['headers']['X-NC-NICKNAME'] = $nickName;
|
||||
$options['headers']['X-NC-NICKNAME'] = urlencode($nickName);
|
||||
}
|
||||
|
||||
$options['body'] = \GuzzleHttp\Psr7\Utils::streamFor($content);
|
||||
|
|
|
|||
Loading…
Reference in a new issue