Resolve relative icon URLs when attaching web app icons #273

Merged
raucao merged 1 commits from fix/app-catalog-relative-icon-url into master 2026-11-23 19:10:22 +00:00
Owner

AppCatalogManager::UpdateMetadata built remote icon download URLs with naive string concatenation, so a relative src such as ./apple-touch-icon.png became https://host/./apple-touch-icon.png. Servers that do not normalise dot segments (5apps runs openresty) answer those with 404, so the icon was silently never attached.

This resolves icon URLs against the web app URL with URI.join (RFC 3986), which collapses dot segments and still handles bare and absolute URLs correctly.

It also bumps manifique to ~> 1.1.1, which fixes the same class of bug for relative web app manifest URLs (./manifest.webmanifest) — the reason a connected remoteStorage app showed no icon and only its host as name in production.

Adds service specs covering manifest metadata loading and icon URL resolution.

After deploy, the affected web app record needs a one-off metadata refresh (AppCatalog::WebApp.find(id).update_metadata).

`AppCatalogManager::UpdateMetadata` built remote icon download URLs with naive string concatenation, so a relative `src` such as `./apple-touch-icon.png` became `https://host/./apple-touch-icon.png`. Servers that do not normalise dot segments (5apps runs openresty) answer those with 404, so the icon was silently never attached. This resolves icon URLs against the web app URL with `URI.join` (RFC 3986), which collapses dot segments and still handles bare and absolute URLs correctly. It also bumps `manifique` to `~> 1.1.1`, which fixes the same class of bug for relative web app manifest URLs (`./manifest.webmanifest`) — the reason a connected remoteStorage app showed no icon and only its host as name in production. Adds service specs covering manifest metadata loading and icon URL resolution. After deploy, the affected web app record needs a one-off metadata refresh (`AppCatalog::WebApp.find(id).update_metadata`).
raucao added 1 commit 2026-11-23 19:08:11 +00:00
Resolve relative icon URLs when attaching web app icons
CI / Test (pull_request) Successful in 1m1s
Release Drafter / Update release notes draft (pull_request) Successful in 3s
07b7dc9cec
AppCatalogManager::UpdateMetadata built remote icon download URLs with
naive string concatenation, so a relative src such as
"./apple-touch-icon.png" produced a URL with a dot segment
(https://host/./apple-touch-icon.png). Servers that do not normalise dot
segments (e.g. 5apps/openresty) answer those with 404, so the icon was
never attached.

Resolve icon URLs against the web app URL with URI.join (RFC 3986), which
collapses dot segments and handles bare and absolute URLs correctly.

Bump manifique to ~> 1.1.1, which fixes the same class of bug for relative
web app manifest URLs ("./manifest.webmanifest"), and add service specs
covering manifest metadata loading and icon URL resolution.
raucao added the
integration
remotestorage
bugkredits-2
labels 2026-11-23 19:10:14 +00:00
raucao merged commit 97126c0684 into master 2026-11-23 19:10:22 +00:00
raucao deleted branch fix/app-catalog-relative-icon-url 2026-11-23 19:10:23 +00:00
Sign in to join this conversation.