Skip to content

Commit 8c28b6b

Browse files
Merge pull request #59884 from nextcloud/backport/59867/stable32
[stable32] fix(files_sharing): Drop trailing '?' from public download redirect URL
2 parents 1e2d1c0 + e98ec3c commit 8c28b6b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/files_sharing/lib/Controller/ShareController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,9 @@ public function downloadShare($token, $files = null, $path = '') {
418418
}
419419

420420
$davUrl = '/public.php/dav/files/' . $token . $davPath;
421-
$davUrl .= '?' . http_build_query($params);
421+
if (!empty($params)) {
422+
$davUrl .= '?' . http_build_query($params);
423+
}
422424
return new RedirectResponse($this->urlGenerator->getAbsoluteURL($davUrl));
423425
}
424426
}

0 commit comments

Comments
 (0)