Community store: apps added after today's ssrf fix never appear in the public listing
-
Since commit
09c562f(ssrf protection, deployed today), newly added community apps show under My Apps but their public page returns 404 and they are missing from/api/apps.Probable cause: in
downloadIconinsrc/apps.js,secureGet(iconUrl)is now wrapped insafe(() => ...). A superagent request is a thenable, sosafe()awaits it and returns a Promise instead of the request object. The next line then callsrequest.ok(...), which throwsTypeError: request.ok is not a function. The error propagates out ofresolveEntry, andrefreshCacheskips the app entirely withSkipping community app <title> (<url>): request.ok is not a functionin the log.Existing apps are unaffected because their icons are already cached and
downloadIconreturns before the broken line. Any app added after the deploy has no cached icon and is dropped from the listing on every refresh.Reproduced locally against the current repo with
npm ciand a valid versions file (it passesparseVersionsandcheckVersionsRequirementscleanly).Suggested fix: build the request in a plain try/catch instead of
safe(), for examplelet request; try { request = secureGet(iconUrl); } catch { return; } const [error, response] = await safe(request.ok(() => true));Affected example: Nextcloud Talk HPB, added today. https://ca.cloudron.io/app/nextcloud-talk-hpb returns 404 while the entry exists in My Apps.
-
R robi referenced this topic
-
G girish has marked this topic as solved
-
G girish marked this topic as a regular topic
-
J joseph marked this topic as a question
-
J joseph has marked this topic as solved
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login