Update to invalid app tarball fails with wrong error message
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 8.8k
- Forks
- 2.1k
- Avg merge
- 20h 7m
- Merged PRs (30d)
- 41
Description
Steps
- Install an app, for example activity-2.4.1 from tarball:
occ market:install -l activity-2.4.1.tar.gz - Go to Github releases and download the wrong tarball, not the release one but the github sources: https://github.com/owncloud/activity/archive/v2.4.2.tar.gz
occ market:upgrade -l activity-2.4.2.tar.gz<= the wrong tarball
Expected result
Upgrade fails with proper error message.
Actual result
Original app is deleted but the new app isn't there.
This basically deletes the app...
Version
stable10 / 10.1.0
Note: the "wrong" tarball doesn't have "activity" as root path but "activity-2.4.2".
We should extend the update code to verify that the tarball contains an "activity" folder just like the install process does.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the app update code exercised by occ market:upgrade -l activity-2.4.2.tar.gz, and compare its tarball handling with the install process used by occ market:install. Reproduce the upgrade using a tarball whose root folder is activity-2.4.2 rather than activity; done means the original app is preserved and the command reports a proper validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100