mirror of
https://github.com/nextcloud/server.git
synced 2026-05-19 16:39:59 -04:00
fix(files_sharing): Drop trailing '?' from public download redirect URL
Public share download links now redirect to the public DAV endpoint cleanly when no additional query parameters are present. Previously the redirect always appended a trailing '?' to the target URL, which caused an Internal Server Error for clients that called the legacy download endpoint without query parameters (e.g. the Thunderbird FileLink extension). Links shared before this change are resolvable again. Signed-off-by: nfebe <fenn25.fn@gmail.com>
This commit is contained in:
parent
9fd18b2812
commit
0ef2caccc6
1 changed files with 3 additions and 1 deletions
|
|
@ -401,7 +401,9 @@ class ShareController extends AuthPublicShareController {
|
|||
}
|
||||
|
||||
$davUrl = '/public.php/dav/files/' . $token . $davPath;
|
||||
$davUrl .= '?' . http_build_query($params);
|
||||
if (!empty($params)) {
|
||||
$davUrl .= '?' . http_build_query($params);
|
||||
}
|
||||
return new RedirectResponse($this->urlGenerator->getAbsoluteURL($davUrl));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue