Skip to content

fix(appstore): do not wrap app store screenshots in the proxy twice - #64771

Merged
edward-ly merged 1 commit into
nextcloud:masterfrom
metaworx:fix/appstore-screenshot-double-proxy
Oct 28, 2026
Merged

edward-ly merged 1 commit into
nextcloud:masterfrom
metaworx:fix/appstore-screenshot-double-proxy

Conversation

@martin-rueegg

Copy link
Copy Markdown
Contributor
  • Resolves: no issue filed; see Summary

Summary

Since nextcloud/appstore@fd69d12680, apps.json serves every screenshot URL already in proxy form, https://usercontent.apps.nextcloud.com/<base64url of the source> (all 1267 in /api/v1/platform/33.0.0/apps.json on 2026-09-25). ApiController wraps it in the proxy again, so the Apps page links to a key the proxy never stores the image under. Today every app's preview is empty or a "Preview not available" placeholder, including apps whose screenshots load on apps.nextcloud.com.

createProxyPreviewUrl() now passes a URL already in proxy form through unchanged, and the app list uses it too instead of its own inline copy. URLs still wrapped here, from an app's own info.xml, are encoded with the URL-safe alphabet the proxy stores its files under since nextcloud/usercontent.apps.nextcloud.com#25; plain base64_encode misses whenever the encoding contains + or /.

The double-wrapped keys that answer at all today do so only because of a proxy bug that caches placeholders under them, fixed in nextcloud/usercontent.apps.nextcloud.com#31.

TODO

  • Backport to the supported stable branches, which carry the same code

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

🤖 Generated with Claude Code

@edward-ly edward-ly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Just one small change from me and we can get this in. Also remember to rebase the branch so that the base keeps up with master.

Comment thread apps/appstore/tests/Controller/ApiControllerTest.php Outdated
@martin-rueegg
martin-rueegg force-pushed the fix/appstore-screenshot-double-proxy branch from 0e6d75a to 3c28332 Compare September 30, 2026 19:55
@edward-ly edward-ly added the 3. to review Waiting for reviews label Sep 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@edward-ly edward-ly left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, but LGTM!

The app store now serves screenshot URLs already pointing at
usercontent.apps.nextcloud.com. Wrapping them again names a file the
proxy never stores the image under, so no app shows its screenshot.

Pass such URLs through unchanged, and encode the others with the URL-safe
alphabet the proxy stores its files under.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Martin Rüegg <martin.rueegg@metaworx.ch>
@edward-ly
edward-ly force-pushed the fix/appstore-screenshot-double-proxy branch from 3c28332 to dc341b4 Compare October 28, 2026 20:42
@edward-ly

Copy link
Copy Markdown
Contributor

/backport to stable35

@edward-ly

Copy link
Copy Markdown
Contributor

/backport to stable34

@edward-ly

Copy link
Copy Markdown
Contributor

/backport to stable33

@edward-ly
edward-ly enabled auto-merge October 28, 2026 20:44
@edward-ly
edward-ly merged commit d087dc3 into nextcloud:master Oct 28, 2026
156 of 161 checks passed
@welcome

welcome Bot commented Oct 28, 2026

Copy link
Copy Markdown

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

@backportbot

backportbot Bot commented Oct 28, 2026

Copy link
Copy Markdown

The backport to stable33 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable33
git pull origin stable33

# Create the new backport branch
git checkout -b backport/64771/stable33

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick dc341b43

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/64771/stable33

Error: Failed to check for changes with origin/stable33: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews backport-request bug community pull requests from community feature: apps management feedback-requested php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants