Skip to content

fix: respect bundled apps and drop the dead marketplace API key - #542

Merged
phil-davis merged 3 commits into
masterfrom
fix/bundled-apps-marketplace-key-secrets
Aug 18, 2026
Merged

fix: respect bundled apps and drop the dead marketplace API key#542
phil-davis merged 3 commits into
masterfrom
fix/bundled-apps-marketplace-key-secrets

Conversation

@DeepDiver1975

@DeepDiver1975 DeepDiver1975 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Two defects that surfaced together in a 10.16.4 startup log that ended at
admin_audit: App (admin_audit) is not known at the marketplace. with no error
banner and no Apache. Scoped to v22.04 and v24.04; v20.04 is dormant and
untouched.

The secret-leak fix that was originally part of this PR now lives in #543 — it is
reviewable and mergeable on its own.

1. Apps that ship in the image are no longer sent to the marketplace (#539)

40-apps.sh gated the install branch on ${OWNCLOUD_VOLUME_APPS}/${VAL} only,
never /var/www/owncloud/apps/${VAL} — the enable/disable branches in the same
file already check both. A bundled app was therefore invisible to the check and
handed to occ market:install on every start. For an OCL app such as
admin_audit that lookup fails, market:install exits 1, and because the hook
is sourced by /usr/bin/owncloud under set -eo pipefail the shell dies
before exec "$@" — the container never starts and prints no error.

Not a 10.16.4 regression: reproduced byte-identically on 10.16.3, whose hook
scripts, app set and apps.json payload are the same.

The guard now covers both directories, market:upgrade --major moved inside it
(UpgradeApp fails on the same exception path), and a genuine marketplace
failure now says why. The URL branch is unchanged — an explicit URL is an
unambiguous request to install from that tarball.

2. OWNCLOUD_MARKETPLACE_KEY removed (#540)

Marketplace API keys no longer exist. marketplace.ca, appstoreenabled and
appstoreurl stay. config.php is regenerated on every start, so
marketplace.key disappears from existing deployments on the next restart — no
migration needed.

Verification

Ran against owncloud/server:10.16.4 with this overlay layered in (sqlite, no
DB container):

result
OWNCLOUD_APPS_INSTALL=admin_audit exit 0, no marketplace call, admin_audit Enabled at /var/www/owncloud/apps/admin_audit (was exit 1)
same + OWNCLOUD_APPS_INSTALL_MAJOR=true exit 0
OWNCLOUD_APPS_INSTALL=this_app_does_not_exist exit 1 with the new two-line ERROR: guidance
OWNCLOUD_APPS_INSTALL=music still installs and enables from the marketplace
OWNCLOUD_MARKETPLACE_KEY=SomeApiKey absent from the generated config.php; marketplace.ca still written

shellcheck clean on every touched script, php -l clean on both templates.

Follow-up

owncloud-docker/server needs its FROM owncloud/base:22.04@sha256:... digest
bumped in v22.04/Dockerfile.multiarch once this is published (Renovate
normally does this).

Workaround for affected users, no rebuild needed: move bundled apps out of
OWNCLOUD_APPS_INSTALL into OWNCLOUD_APPS_ENABLE.

🤖 Generated with Claude Code

DeepDiver1975 and others added 2 commits August 18, 2026 16:14
The install branch of 40-apps.sh only checked ${OWNCLOUD_VOLUME_APPS}/${VAL},
never /var/www/owncloud/apps/${VAL}, while the enable/disable branches in the
same file check both. Any app bundled in the release tarball was therefore
handed to `occ market:install` on every start. For an OCL app such as
admin_audit that lookup fails, `market:install` exits 1, and since the hook is
sourced by /usr/bin/owncloud under `set -eo pipefail` the container dies before
`exec "$@"` - with no error banner.

Check both directories, move the `market:upgrade --major` call inside the guard
(UpgradeApp fails on the same exception path), and report why a marketplace
install failed instead of dying silently.

Fixes #539

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Marketplace API keys no longer exist, so OWNCLOUD_MARKETPLACE_KEY (and its
OWNCLOUD_MARKETPLACE_APIKEY fallback) and the marketplace.key config value they
write are dead configuration surface.

marketplace.ca, appstoreenabled and appstoreurl stay: the store still serves
community apps anonymously and those keys still allow disabling the appstore or
pointing at a private one. config.php is regenerated on every start, so
marketplace.key disappears from existing deployments on the next restart.

Fixes #540

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975
DeepDiver1975 force-pushed the fix/bundled-apps-marketplace-key-secrets branch from 0083f5e to 364896b Compare August 18, 2026 14:41
@DeepDiver1975 DeepDiver1975 changed the title fix: respect bundled apps, drop the dead marketplace API key, keep secrets out of the log fix: respect bundled apps and drop the dead marketplace API key Aug 18, 2026
@phil-davis
phil-davis merged commit f4b2f6f into master Aug 18, 2026
6 checks passed
@phil-davis
phil-davis deleted the fix/bundled-apps-marketplace-key-secrets branch August 18, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants