-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(apps-store): Fix exception on generating preview url for installed app screenshot #48912
Conversation
0c41b0f
to
732d2ec
Compare
I'll amend the actual fix... |
…enshots Some installed apps meant for older server versions might unexpectedly offer up screenshot values in a non-string format (e.g. health). Avoid an exception by checking first if the first app screenshot is indeed a string and otherwise we take the value of the parameter Signed-off-by: Claudio Cambra <[email protected]>
732d2ec
to
7e6b23b
Compare
…rays Signed-off-by: Joas Schilling <[email protected]>
7e6b23b
to
220bd34
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL: Do not trust the appinfo XSD.
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 |
Well the problem is a bit that PHP's XML engine makes things a string until they appear multiple times 🙈 |
/backport to stable30 |
Summary
Some installed apps meant for older server versions might unexpectedly offer up screenshot values in a non-string format (e.g. health). Avoid an exception by checking first if the first app screenshot is indeed a string and only then trying to create the $proxyPreviewUrl
Example error:
TODO
This is my first server PR so apologies if I messed something up
Checklist