From 9804988bf1f7019d6dd17e15f689fc05f39ddaaf Mon Sep 17 00:00:00 2001 From: Edward Ly Date: Mon, 10 Aug 2026 15:57:19 -0700 Subject: [PATCH] fix(appstore): use URL-safe base64 encoding for user content proxy URLs Signed-off-by: Edward Ly --- apps/appstore/lib/Controller/ApiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/appstore/lib/Controller/ApiController.php b/apps/appstore/lib/Controller/ApiController.php index c3b0d70df932d..f0d2c47b1ec25 100644 --- a/apps/appstore/lib/Controller/ApiController.php +++ b/apps/appstore/lib/Controller/ApiController.php @@ -306,7 +306,7 @@ private function createProxyPreviewUrl(string $url): string { return ''; } - return 'https://usercontent.apps.nextcloud.com/' . base64_encode($url); + return 'https://usercontent.apps.nextcloud.com/' . strtr(base64_encode($url), '+/', '-_'); } private function fetchApps(): void { @@ -478,7 +478,7 @@ private function getAppsForCategory(string $requestedCategory = ''): array { $phpDependencies ), 'level' => ($app['isFeatured'] === true) ? 200 : 100, - 'screenshot' => isset($app['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/' . base64_encode($app['screenshots'][0]['url']) : '', + 'screenshot' => isset($app['screenshots'][0]['url']) ? 'https://usercontent.apps.nextcloud.com/' . strtr(base64_encode($app['screenshots'][0]['url']), '+/', '-_') : '', 'ratingOverall' => $app['ratingOverall'], 'ratingNumOverall' => $app['ratingNumOverall'], 'removable' => $existsLocally,